Skip to content

Commit

Permalink
change to use fzf.vim from ctrlp.vim
Browse files Browse the repository at this point in the history
  • Loading branch information
sasaplus1 committed Feb 26, 2024
1 parent 8a35460 commit 4b56f34
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions vim/plugins/ctrlp.vim.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
scriptencoding utf-8

" NOTE: for temporary use fzf.vim
if 1
finish
endif

if !exists('*dein#add')
finish
endif
Expand Down
7 changes: 6 additions & 1 deletion vim/plugins/fzf.vim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,19 @@ function! s:hook_source() abort
nnoremap <silent> ,ch :<C-u>MyCheatSheet<CR>
nnoremap <silent> ,rg :<C-u>FzfRg<CR>
nnoremap <silent> ,rG :<C-u>FzfRG<CR>
if !dein#tap('ctrlp')
nnoremap <expr> <C-p> len(finddir('.git', '.;')) != 0 ? ':<C-u>FzfGitFiles<CR>' : ':<C-u>FzfFiles<CR>'
endif

endfunction

call dein#add('junegunn/fzf.vim', {
\ 'depends' : ['fzf'],
\ 'hook_source' : function('s:hook_source'),
\ 'if' : v:version >= 704 && dein#tap('fzf'),
\ 'lazy' : 1,
\ 'on_map' : [',ch', ',rg', ',rG', '<Plug>(fzf-'],
\ 'on_map' : [',ch', ',rg', ',rG', '<C-p>', '<Plug>(fzf-'],
\ })

" vim:ft=vim:fdm=marker:fen:

0 comments on commit 4b56f34

Please sign in to comment.