Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Especially if this is long term, this is a great tool:
https://github.com/hound-search/hound#hound
It would be great if someone integrated this with tree-sitter plus something to make the search semantics a bit smarter about usages of X:
https://www.etsy.com/codeascraft/announcing-hound-a-lightnin...
Screenshots:
https://jaxenter.com/hound-go-react-code-search-engine-15008...
Another trick I use for Java: javap all the Enums out of the compiled artifacts; these indicate weird things like "modes" that you can use to start asking questions relevant to the domain. Like "why are there four ways to reprice an invoice" or finding the "types" of fees or w/e in a billing system. (assuming enum classes are used)
I almost always fall back on ag (https://github.com/ggreer/the_silver_searcher).
Honourable mentions to cscope and ctags. They work for me since most of my $dayjob involves me mucking around with C++.
All tools get invoked from within Vim. (Which _also_ works reasonably well in Windows Terminal).
I work on code bases with millions of lines, so I wrote a tool called Septum to help me (https://github.com/pyjarrett/septum/). This isn't to replace grep or ripgrep or silver searcher, those are all great tools you should have!
Septum is neighborhood based (context-based) search, so you can find contiguous groups of lines which contain specific things, but exclude other things. It's also interactive so you can add/remove filters as needed. This makes it useful for those cases where terms change based on their context so you can exclude terms related to the contexts you don't want to keep. It reads .septum/config which contains its normal commands to load directories and settings, so you can have different configs per project you're working on.
Whenever I work on huge codebase (think 1M+), I always reach for Russ Cox's codesearch https://github.com/google/codesearch. It requires indexing the codebase first, which takes 15 minutes or so, but after that searches are instant.