From 0304b5070dcbcf4637b505d23e9e0e890c960bdf Mon Sep 17 00:00:00 2001 From: ManjaroOne666 Date: Wed, 12 Dec 2018 21:18:10 +0000 Subject: [PATCH] replace ctrl-p with fzf.vim --- vimrc | 68 +++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 52 insertions(+), 16 deletions(-) diff --git a/vimrc b/vimrc index 897179e..db31743 100644 --- a/vimrc +++ b/vimrc @@ -26,22 +26,22 @@ if !has('nvim') Plug '~/.config/vim/vim/bundle/vim-learnxiny' " #Ctrlp {{{ - Plug 'ctrlpvim/ctrlp.vim' - " :h ctrlp-commands - " :h ctrlp-extensions - - let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'undo'] - - if executable('ag') - " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore - let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' - " ag is fast enough that CtrlP doesn't need to cache - let g:ctrlp_use_caching = 0 - endif - " Use ag over grep - if executable('ag') - set grepprg=ag\ --nogroup\ --nocolor\ --ignore\ node_modules - endif + " Plug 'ctrlpvim/ctrlp.vim' + " " :h ctrlp-commands + " " :h ctrlp-extensions + " + " let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'undo'] + " + " if executable('ag') + " " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore + " let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' + " " ag is fast enough that CtrlP doesn't need to cache + " let g:ctrlp_use_caching = 0 + " endif + " " Use ag over grep + " if executable('ag') + " set grepprg=ag\ --nogroup\ --nocolor\ --ignore\ node_modules + " endif "}}} " #Netrw {{{ @@ -100,6 +100,42 @@ let g:mta_filetypes = { nmap ga (EasyAlign) "}}} +" #vim-fzf {{{ +" https://github.com/junegunn/fzf.vim +if executable('fzf') && v:version >= 704 + Plug 'junegunn/fzf.vim' + + nnoremap ff :Files + nnoremap ft :Tags + nnoremap fb :Buffers + nnoremap fh :Helptags + nnoremap fa :Ag + nnoremap fg :Ag! + + " Ag! gives fullscreen with preview + command! -bang -nargs=* Ag + \ call fzf#vim#ag(, + \ 0 ? fzf#vim#with_preview('up:60%') + \ : fzf#vim#with_preview('right:50%:hidden', '?'), + \ 0) + + let g:fzf_colors = + \ { 'fg': ['fg', 'Normal'], + \ 'bg': ['bg', 'Normal'], + \ 'hl': ['fg', 'Label'], + \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'], + \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'], + \ 'hl+': ['fg', 'WildMenu'], + \ 'info': ['fg', 'Comment'], + \ 'border': ['fg', 'Ignore'], + \ 'prompt': ['fg', 'Constant'], + \ 'pointer': ['fg', 'Special'], + \ 'marker': ['fg', 'Keyword'], + \ 'spinner': ['fg', 'Label'], + \ 'header': ['fg', 'Comment'] } +endif + +"}}} " #vim-qlist {{{ " Original: https://github.com/romainl/vim-qlist Plug 'studio-vx/vim-qlist'