vim插件Leaderf的功能补充

 1、快捷键及排除搜索目录设置:

nnoremap f :LeaderfFile ~
noremap  :LeaderfFunction!
let g:Lf_WildIgnore = {
            \ 'dir': ['.svn','.git','.hg','.vscode','.wine','.deepinwine','.oh-my-zsh'],
            \ 'file': ['*.sw?','~$*','*.bak','*.exe','*.o','*.so','*.py[co]']
            \}

" 按Esc键退出函数列表
let g:Lf_NormalMap = {
	\ "File":   [["", ':exec g:Lf_py "fileExplManager.quit()"']],
	\ "Buffer": [["", ':exec g:Lf_py "bufExplManager.quit()"']],
	\ "Mru":    [["", ':exec g:Lf_py "mruExplManager.quit()"']],
	\ "Tag":    [["", ':exec g:Lf_py "tagExplManager.quit()"']],
	\ "Function":    [["", ':exec g:Lf_py "functionExplManager.quit()"']],
	\ "Colorscheme":    [["", ':exec g:Lf_py "colorschemeExplManager.quit()"']],
	\ }
" let g:Lf_UseCache = 0

2、安装搜索工具rg:

curl -LO https://github.com/BurntSushi/ripgrep/releases/download/0.10.0/ripgrep_0.10.0_amd64.deb
sudo dpkg -i ripgrep_0.10.0_amd64.deb

" ack
if executable('rg')
    let g:ackprg = 'rg --vimgrep'
endif
nnoremap F :Ack!
let g:ackhighlight = 1
let g:ack_autoclose = 1

 

你可能感兴趣的:(vim)