diff --git a/bashrc b/bashrc index 96d2670..16f94b2 100644 --- a/bashrc +++ b/bashrc @@ -86,6 +86,7 @@ function refresh_gpga() { } export FZF_DEFAULT_COMMAND='ag -g ""' +export FZF_DEFAULT_OPTS='--height 40% --border' function filecurl { cat $1 | xargs -n 1 curl -LO diff --git a/vimrc b/vimrc index 995d342..44730a4 100644 --- a/vimrc +++ b/vimrc @@ -7,7 +7,6 @@ call plug#begin('~/.vim/plugged') Plug 'junegunn/fzf.vim' Plug 'jamessan/vim-gnupg' Plug 'vim-scripts/openssl.vim' - Plug 'mileszs/ack.vim' call plug#end() " }}} @@ -161,7 +160,7 @@ vnoremap _ { nnoremap \ ; nnoremap ; : nnoremap 0 ^ -nnoremap r :Rack +nnoremap f :Gitag autocmd FileType go setlocal omnifunc=go#complete#Complete " w!! will save file with sudo @@ -206,11 +205,27 @@ endfunction if executable("fzf") - let g:fzf_layout = { 'down': '~30%' } - "nnoremap :FZF - "command! -bang -nargs=* -complete=file GZF call fzf#run(fzf#wrap({'dir': system("git rev-parse --show-toplevel"), 'options' : '--multi'},0)) - command! GZF execute 'Files' s:find_git_root() - nnoremap :GZF + command! -bang -nargs=+ -complete=dir Gitag call fzf#vim#ag_raw( . ' ' . s:find_git_root(), + \ 0 ? fzf#vim#with_preview('up:60%') + \ : fzf#vim#with_preview('right:50%:hidden', '?'), + \ 0) + + let g:fzf_layout = { 'down': '~40%' } + nnoremap :GFiles + let g:fzf_colors = + \ { 'fg': ['fg', 'Normal'], + \ 'bg': ['bg', 'Normal'], + \ 'hl': ['fg', 'Comment'], + \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'], + \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'], + \ 'hl+': ['fg', 'Statement'], + \ 'info': ['fg', 'PreProc'], + \ 'border': ['fg', 'Ignore'], + \ 'prompt': ['fg', 'Conditional'], + \ 'pointer': ['fg', 'Exception'], + \ 'marker': ['fg', 'Keyword'], + \ 'spinner': ['fg', 'Label'], + \ 'header': ['fg', 'Comment'] } endif " }}} @@ -252,6 +267,10 @@ map :lp "set updatetime=100 au FileType go iabbrev _brdoes r *http.Request, results *validation.ValidatedResults) error { au FileType go iabbrev _brhandler w http.ResponseWriter, r *http.Request, results *validation.ValidatedResults) (*api.Return, error) { +let g:go_highlight_types = 1 +let g:go_highlight_functions = 1 +let g:go_highlight_methods = 1 + " }}} @@ -283,20 +302,4 @@ let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['html', 'pe - - -function! Rack(args) - let l:gitDir = system("git rev-parse --show-toplevel") - if l:gitDir =~ "Not a git repository" - execute 'Ack ' . a:args - return - endif - execute 'Ack ' . a:args .' ' . l:gitDir -endfunction -command! -bang -nargs=* -complete=file Rack call Rack() -let g:go_highlight_types = 1 -let g:go_highlight_functions = 1 -let g:go_highlight_methods = 1 - - " vim: set fdm=marker: