From eb071660a17b8570df40ff20758121fe50191937 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Tue, 9 Mar 2021 20:40:10 +0100 Subject: [PATCH] Switch to fzf, remove vim-ripgrep --- vim/after/ftplugin/go.vim | 8 +++++++- vimrc | 23 +++++------------------ 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/vim/after/ftplugin/go.vim b/vim/after/ftplugin/go.vim index 00f908b..00ba43e 100644 --- a/vim/after/ftplugin/go.vim +++ b/vim/after/ftplugin/go.vim @@ -20,8 +20,14 @@ nnoremap dq :GoDebugStop nnoremap dn :GoDebugNext nnoremap ds :GoDebugStep +" fzf configuration: +let g:fzf_action = { + \ 'ctrl-t': 'tab split', + \ 'ctrl-x': 'split', + \ 'ctrl-v': 'vsplit' } + " Vim-Go configuration: -let g:go_decls_mode = 'skim' +let g:go_decls_mode = 'fzf' let g:go_fmt_autosave = 0 " Vim-Go seems to handle fix-on-save better than ALE: let g:go_imports_autosave = 1 diff --git a/vimrc b/vimrc index 45bfe24..8ee3dd1 100644 --- a/vimrc +++ b/vimrc @@ -124,19 +124,6 @@ endfunction nmap q :call ToggleQuickFix() nmap l :lclose -" vim-ripgrep configuration: -let g:rg_highlight = 1 -function RequestGrep() - call inputsave() - let s:pattern = trim(input("grep: ")) - call inputrestore() - if len(s:pattern) > 0 - execute 'Rg' s:pattern - endif -endfunction -map * :call RequestGrep() -map 8 :call RequestGrep() - " deoplete configuration packadd! deoplete.nvim let g:deoplete#enable_at_startup = 1 @@ -157,9 +144,10 @@ inoremap pumvisible() ? "\" : "\" " vim-markdown configuration: let g:vim_markdown_conceal = 1 -" Skim configuration: +" fzf configuration: nmap t :GFiles nmap b :Buffers +nmap gg :Rg " Lightline configuration: set laststatus=2 @@ -265,11 +253,10 @@ packadd! lightline.vim packadd! tmux-complete.vim packadd! vim-commentary packadd! vim-gitgutter -" Requires both skim.vim plugin to be manually installed: -" https://github.com/lotabout/skim/blob/master/plugin/skim.vim +" Requires both fzf.vim plugin to be manually installed: +" https://github.com/junegunn/fzf/blob/master/plugin/fzf.vim " and also this separate plugin, which is loaded here: -" https://github.com/lotabout/skim.vim/blob/master/autoload/fzf/vim.vim -packadd! skim.vim +packadd! fzf.vim packadd! vim-go packadd! vim-surround packadd! vim-yaml-folds