3 ms·
What do either of these `grepprg` options win me? Currently my `grepprg` calls `ag` which is plenty fast for me, and it sounds like `lid` is a slightly more gen
by brian_cloutier 4y ago
What do either of these `grepprg` options win me? Currently my `grepprg` calls `ag` which is plenty fast for me, and it sounds like `lid` is a slightly more general ctags?
- kazinator 4y agolid doesn't tell you where an identifier is defined, but indexes all the places where it occurs. A lid query is instant; it just pulls the info from the ID file without searching any files. In a large-ish project like the Linux kernel tree, there is no perceptible delay. I use ctags in parallel with mkid; different tools for different job. Speaking of :grep, I have it mapped to the K key. The default action of K is to do a man page lookup of the word under the cursor. I changed it to grep instead. ... and I preserved the man page functionality too. The default K takes an optional prefix (man page section). I have it so that if I give a numeric prefix to K, it will do the man page lookup for that section: :nmap K "_y:execute count ? ( ":!man " . count . " " . expand("<cword>") ) : ( ":grep \\<" . expand("<cword>") . "\\>")<CR> and for grepping for a visual selection: :vmap K "zy:execute ":grep " . getreg("z")<CR>