diff --git a/nvim/init.vim b/nvim/init.vim index 80f50c6..65d29a4 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -11,7 +11,8 @@ Plug 'ervandew/supertab' " of words. Plug 'easymotion/vim-easymotion' " Fuzzy search -Plug 'Yggdroot/LeaderF', { 'do': './install.sh' } +Plug 'junegunn/fzf.vim' +Plug 'jesseleite/vim-agriculture' " Remove extraneous whitespace when edit mode is exited Plug 'thirtythreeforty/lessspace.vim' " Status bar mods @@ -198,16 +199,25 @@ nnoremap pg :PlugUpgrade nnoremap pd :PlugUpdate nnoremap pc :PlugClean " For Fuzzy -nnoremap vf :LeaderfFile -nnoremap vb :LeaderfBuffer -nnoremap vL :LeaderfLineAll -nnoremap vl :LeaderfLine -nnoremap vh :LeaderfHistorySearch -nnoremap vc :LeaderfHistoryCmd -nnoremap vt :LeaderfTag -nnoremap vw :LeaderfTagCword -nnoremap vm :LeaderfMru -nnoremap d :exe ':Leaderf! rg -e ' . expand("") +nnoremap vf :GFiles +nnoremap v? :GFiles? +nnoremap vF :Files +nnoremap vb :Buffers +nnoremap vL :Lines +nnoremap vl :BLines +nnoremap vt :BTags +nnoremap vT :Tags +nnoremap vc :BCommits +nnoremap vC :Commits +nnoremap vch :History: +nnoremap vsh :History/ +nnoremap vm :Commands +nnoremap vo :Locate +nnoremap vk :Maps +nnoremap d :exe ':Rg ' . expand('') +nnoremap / RgRawSearch +vnoremap / RgRawVisualSelection +nnoremap * RgRawWordUnderCursor " Quick buffer switching nnoremap b :ls:b " Undo tree @@ -301,6 +311,11 @@ noremap nnoremap :WhichKey '' +command! -bang -nargs=* GGrep + \ call fzf#vim#grep( + \ 'git grep --line-number '.shellescape(), 0, + \ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), 0) + " --------------------------- Autocmd groups --------------------------------- augroup HaskellMaps au! @@ -518,10 +533,6 @@ let g:slime_no_mappings = 1 let g:slime_python_ipython = 1 let g:slime_dont_ask_default = 1 let g:slime_preserve_curpos = 0 -" For LeaderF -let g:Lf_WindowPosition = 'popup' -let g:Lf_PreviewInPopup = 1 -let g:Lf_CommandMap = {'': [''], '': ['']} let g:nvimgdb_config_override = { \ 'key_next': 'n', @@ -543,6 +554,7 @@ let g:cpp_class_decl_highlight = 1 let g:cpp_posix_standard = 1 let g:cpp_concepts_highlight = 1 +let g:agriculture#rg_options = '--case-sensitive' " ----------------------------- Functions ------------------------------------ " For CScope and Quickfix " https://medium.com/@lakshmankumar12/quickfix-and-location-list-in-vim-ca0292ac894d