From 3e1968cf1428d9ddda0fd363aa0c20557b4141b4 Mon Sep 17 00:00:00 2001 From: johannst Date: Mon, 18 Jun 2018 21:04:13 +0200 Subject: added fzf vim plugin --- vimrc | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'vimrc') diff --git a/vimrc b/vimrc index 5626c31..1cc3d58 100644 --- a/vimrc +++ b/vimrc @@ -31,12 +31,13 @@ Plugin 'ap/vim-buftabline' "Plugin 'vim-airline/vim-airline' "Plugin 'vim-airline/vim-airline-themes' Plugin 'majutsushi/tagbar' -Plugin 'ctrlpvim/ctrlp.vim' +"Plugin 'ctrlpvim/ctrlp.vim' "Plugin 'vim-scripts/OmniCppComplete' Plugin 'vim-scripts/YankRing.vim' Plugin 'johannst/Clever-Tabs' Plugin 'johannst/AsyncCmdProcessor.vim' Plugin 'w0rp/ale' +Plugin 'junegunn/fzf.vim' call vundle#end() @@ -152,6 +153,28 @@ if s:IsPluginEnabled('w0rp/ale') hi link ALESignColumnWithErrors LineNr endif +if s:IsPluginEnabled('junegunn/fzf.vim') + nnoremap ft :BTags + nnoremap fc :Tags + nnoremap ff :Files + nnoremap fp :Files + "nnoremap f :CtrlPCurFile + nnoremap fb :Buffers + nnoremap fs :History/ + let g:fzf_action = { 'ctrl-s': 'split', + \ 'ctrl-v': 'vsplit' } + + "imap (fzf-complete-path) + + command! -bang -nargs=* Rg + \ call fzf#vim#grep( + \ 'rg --column --line-number --no-heading --color=always '.shellescape(), 1, + \ 0 ? fzf#vim#with_preview('up:60%') + \ : fzf#vim#with_preview('right:50%:hidden', '?'), + \ 0) + nnoremap rg :Rg +endif + "}}} "{{{ Vim Basic -- cgit v1.2.3