Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

lid 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>


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: