aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-04-13 18:41:59 +0800
committerGuangxiong Lin <[email protected]>2022-04-13 18:41:59 +0800
commit5c9733b75c950f559cf533c9391df83b819d1155 (patch)
tree455a7e7cb81d115906d6cc80beb0d3cd6bf256dc
parentf2e6b64ac3785051851e3b94162f8b093899ced8 (diff)
downloaddotfiles-5c9733b75c950f559cf533c9391df83b819d1155.tar.gz
dotfiles-5c9733b75c950f559cf533c9391df83b819d1155.tar.bz2
dotfiles-5c9733b75c950f559cf533c9391df83b819d1155.zip
Improve ctrlp behavior (vim)
-rw-r--r--.vim/after/plugin/ctrlp.vim7
-rw-r--r--.vim/after/plugin/minpac.vim1
2 files changed, 5 insertions, 3 deletions
diff --git a/.vim/after/plugin/ctrlp.vim b/.vim/after/plugin/ctrlp.vim
index 32a0a74..27e5db6 100644
--- a/.vim/after/plugin/ctrlp.vim
+++ b/.vim/after/plugin/ctrlp.vim
@@ -5,18 +5,19 @@ if get(g:, 'loaded_fzf', 0) == 0
let g:ctrlp_regexp = 1
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 . %s'
+ let g:ctrlp_user_command = 'fd --hidden --type f . %s'
endif
nnoremap <leader>fb :CtrlPBuffer<CR>
nnoremap <leader>fm :CtrlPMRU<CR>
nnoremap <leader>fT :CtrlPTag<CR>
- nnoremap <leader>ft :CtrlPBufTag \.<CR>
+ nnoremap <leader>ft :CtrlPBufTag bufnr()<CR>
nnoremap <leader>fq :CtrlPQuickfix<CR>
- nnoremap <leader>fl :CtrlPLine 1<CR>
+ nnoremap <leader>fl :CtrlPLine bufnr()<CR>
packadd ctrlp.vim
endif
diff --git a/.vim/after/plugin/minpac.vim b/.vim/after/plugin/minpac.vim
index b82814b..5530a65 100644
--- a/.vim/after/plugin/minpac.vim
+++ b/.vim/after/plugin/minpac.vim
@@ -23,6 +23,7 @@ function! InitMinpac() abort
call minpac#add('https://github.com/honza/vim-snippets')
call minpac#add('https://github.com/prabirshrestha/vim-lsp')
call minpac#add('https://github.com/ctrlpvim/ctrlp.vim.git', {'type': 'opt'})
+ call minpac#add('https://github.com/FelikZ/ctrlp-py-matcher.git', {'type': 'opt'})
call minpac#add('https://github.com/ludovicchabant/vim-gutentags.git')
call minpac#add('https://github.com/easymotion/vim-easymotion.git')