Yggdroot / LeaderF

An efficient fuzzy finder that helps to locate files, buffers, mrus, gtags, etc. on the fly for both vim and neovim.
Apache License 2.0
2.14k stars 180 forks source link

如何高亮加载到 quickfix 中 的搜索 #1048

Closed keeferwu closed 8 months ago

keeferwu commented 8 months ago

在 vimrc 中添加配置:

" 搜索当前文件选中内容输出到quickfix
vnoremap <silent> <leader>lg y :vimgrep <c-r>" % \| LeaderfQuickFix<cr>
nnoremap <silent> <leader>lg :execute 'vimgrep '.expand("<cword>").' % \| LeaderfQuickFix'<cr>
noremap <silent> <leader>Q :LeaderfQuickFix<cr>

image

如图 如何能让搜索到的结果高亮显示?

Yggdroot commented 8 months ago

还没有这个功能。只能修改源码加上。 话说,你可以使用Leaderf rg 来代替vimgrep,速度更快,功能更多。 这样就用不到LeaderfQuickFix了。