diff options
-rw-r--r-- | .vim/after/plugin/ctrlp.vim | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/.vim/after/plugin/ctrlp.vim b/.vim/after/plugin/ctrlp.vim index 767b00f..ca19bc6 100644 --- a/.vim/after/plugin/ctrlp.vim +++ b/.vim/after/plugin/ctrlp.vim @@ -1,25 +1,27 @@ -if get(g:, 'loaded_fzf_vim', 0) == 0 - let g:ctrlp_map = '<leader>ff' - let g:ctrlp_cmd = 'CtrlP' - let g:ctrlp_working_path_mode = 'ra' - let g:ctrlp_use_caching = 0 - let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'line'] - let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' } - - let g:ctrlp_user_command = 'find %s -type f' - if executable('fd') - let g:ctrlp_user_command = ' - \ fd --hidden --type f . %s - \ --exclude .git' - endif +if executable('fzf') + finish +endif - nnoremap <leader>fb :CtrlPBuffer<CR> - nnoremap <leader>fm :CtrlPMRU<CR> - nnoremap <leader>fT :CtrlPTag<CR> - nnoremap <leader>ft :CtrlPBufTag %<CR> - nnoremap <leader>fq :CtrlPQuickfix<CR> - nnoremap <leader>fl :CtrlPLine %<CR> +let g:ctrlp_map = '<leader>ff' +let g:ctrlp_cmd = 'CtrlP' +let g:ctrlp_working_path_mode = 'ra' +let g:ctrlp_use_caching = 0 +let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'line'] +let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' } - packadd ctrlp.vim - packadd ctrlp-py-matcher +let g:ctrlp_user_command = 'find %s -type f' +if executable('fd') + let g:ctrlp_user_command = ' + \ fd --hidden --type f . %s + \ --exclude .git' endif + +nnoremap <leader>fb :CtrlPBuffer<CR> +nnoremap <leader>fm :CtrlPMRU<CR> +nnoremap <leader>fT :CtrlPTag<CR> +nnoremap <leader>ft :CtrlPBufTag %<CR> +nnoremap <leader>fq :CtrlPQuickfix<CR> +nnoremap <leader>fl :CtrlPLine %<CR> + +packadd ctrlp.vim +packadd ctrlp-py-matcher |