From 06929ba11c0ef83da2462f60ee8c6dc07a2aa9a4 Mon Sep 17 00:00:00 2001 From: gxlin Date: Tue, 16 Mar 2021 10:42:48 +0800 Subject: Split .vimrc to multiple vimscript files --- .vim/plugins/leaderf.vim | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .vim/plugins/leaderf.vim (limited to '.vim/plugins/leaderf.vim') diff --git a/.vim/plugins/leaderf.vim b/.vim/plugins/leaderf.vim new file mode 100644 index 0000000..4d6d0ac --- /dev/null +++ b/.vim/plugins/leaderf.vim @@ -0,0 +1,22 @@ +Plug 'Yggdroot/LeaderF', {'do': './install.sh'} + +" " Show icons, icons are shown by default +let g:Lf_ShowDevIcons = 1 + +" For GUI vim, the icon font can be specify like this, for example +let g:Lf_DevIconsFont = "DejaVuSansMono Nerd Font Mono" +let g:Lf_WindowPosition = 'popup' +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 :=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_RootMarkers = ['.project', '.root', '.svn', '.git'] +let g:Lf_WorkingDirectoryMode = 'AF' -- cgit v1.2.3