79wbdq
Last Updated: February 25, 2016
·
1.706K
· mck-
A3732332a4dd66243b83bd5751826c8c

grep -nr <x> <folder>

One killer feature of any IDE is the ability to jump to a symbol definition in a different file. Sadly, this feature is not always available out of the box (Looking at you Sublime!). Until that day, here's a simple grep I use often to find function definitions or calls.

grep -nr awesome() .

This will search for all occurrences of awesome() in your app and includes the line number with the -n flag. The -r flag ensures recursively traversing your folders.

Add the --color flag if your terminal isn't already showing colors :)

Say Thanks
Respond

1 Response
Add your response

5935
44ba5ab0ceceafd8b79c5ca236f16b2a

I use ctags to do the job. The richer information can also be leveraged by VIM to jump automatically

over 1 year ago ·
Filed Under