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

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 :)

1 Response
Add your response

5935

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

over 1 year ago ·