From 7a2ba4fa9dbae8aa7c05a51d569217d0742e586e Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sat, 11 Sep 2021 18:49:25 +0800 Subject: Move from leaderf.vim to fzf.vim --- .vim/plugin/fzf.vim | 11 +++++++++++ .vim/plugin/init.vim | 3 ++- .vim/plugin/leaderf.vim | 30 ------------------------------ 3 files changed, 13 insertions(+), 31 deletions(-) create mode 100644 .vim/plugin/fzf.vim delete mode 100644 .vim/plugin/leaderf.vim diff --git a/.vim/plugin/fzf.vim b/.vim/plugin/fzf.vim new file mode 100644 index 0000000..32994a1 --- /dev/null +++ b/.vim/plugin/fzf.vim @@ -0,0 +1,11 @@ +let g:fzf_command_prefix = 'Fzf' + +noremap ff :FzfFiles +noremap fbf :FzfBuffers +noremap fm :FzfHistory +noremap ft :FzfTags +noremap fbt :FzfBtags +noremap fa :FzfAg +noremap fc :FzfCommands +noremap fgc :FzfCommits +noremap fl :FzfLines diff --git a/.vim/plugin/init.vim b/.vim/plugin/init.vim index cdd17ea..eaf75f9 100644 --- a/.vim/plugin/init.vim +++ b/.vim/plugin/init.vim @@ -24,7 +24,8 @@ Plug 'prabirshrestha/vim-lsp' Plug 'dense-analysis/ale' Plug 'sheerun/vim-polyglot' -Plug 'Yggdroot/LeaderF', {'do': ':LeaderfInstallCExtension'} +Plug 'junegunn/fzf' +Plug 'junegunn/fzf.vim' Plug 'tpope/vim-eunuch' Plug 'godlygeek/tabular' Plug 'ludovicchabant/vim-gutentags' diff --git a/.vim/plugin/leaderf.vim b/.vim/plugin/leaderf.vim deleted file mode 100644 index babec7e..0000000 --- a/.vim/plugin/leaderf.vim +++ /dev/null @@ -1,30 +0,0 @@ -let g:Lf_ShowDevIcons = 1 -let g:Lf_UseCache = 0 - -let g:Lf_CommandMap = { - \ '': [''], - \ '': [''], - \ } - -let g:Lf_WindowPosition = 'popup' -let g:Lf_PreviewInPopup = 1 -let g:Lf_ShortcutF = "ff" - -noremap fb :=printf("Leaderf buffer %s", "") -noremap fm :=printf("Leaderf mru %s", "") -noremap ft :=printf("Leaderf bufTag %s", "") -noremap fl :=printf("Leaderf line %s", "") -noremap fr :=printf("Leaderf rg %s", "") -noremap fs :=printf("Leaderf self %s", "") -noremap fc :=printf("Leaderf command %s", "") -noremap f :Leaderf -noremap :=printf("Leaderf! rg --current-buffer -e %s ", expand("")) -noremap :=printf("Leaderf! rg -e %s ", expand("")) - -" search visually selected text literally -xnoremap gf :=printf("Leaderf! rg -F -e %s ", leaderf#Rg#visual()) -noremap go :Leaderf! rg --recall - -let g:Lf_WorkingDirectoryMode = 'AF' - -let g:Lf_RootMarkers += ['.project', '.root', '.svn', '.git', '.hg', '.projectile'] -- cgit v1.2.3