Fork me on GitHub
Matt Butler15:01:14

Does anyone have a vim (nvim) tool for finding usages of symbols/keywords etc. I used to get along fine with grep, but as aliased namespaced keywords are becoming more common, its difficult to rely on grep alone (unless I'm missing a trick).


I have a custom mapping that runs :CtrlSF <highlighted text> in visual mode, so I can highlight a keyword and quickly search for all instances of the highlighted string across the entire project.

Matt Butler15:01:49

I see, can that account for if I have a keyword in a namespace like ::foo/bar and find all usages of that, even if its aliased as ::fish/bar in other places?


No. But I would argue that one shouldn't do that 🙂


Clojure-lsp has find references that does what you want.


You will need a lsp client like coc or the one built in on neovim.

Matt Butler17:01:29

Thanks for the pointers, I'll do some digging :thumbsup: