michal-h21 / vim-zettel

VimWiki addon for managing notes according to Zettelkasten method
MIT License
559 stars 73 forks source link

Slow vimgrep commands in Backlinks #154

Open MartyLake opened 3 hours ago

MartyLake commented 3 hours ago

Hello,

I noticed that vimgrep is quite "slow" in the end. Do you have any advice on how to replace it with grep instead? Then users will be able to customize their grepprg for rg --vimgrep or ag --vimgrep even.

Best,

michal-h21 commented 3 hours ago

vimgrep is used only in the backlinks collection. It seems that it is possible to change the command used as a backend for vimgrep like this:

if executable('ag')
    set grepprg=ag\ --vimgrep\ $* grepformat=%f:%l:%c:%m
endif