ide sublime2 how to find method definition

Lesha Pipiev picture Lesha Pipiev · Apr 23, 2012 · Viewed 33.8k times · Source

I'm using Sublime 2 for Ruby On Rails programming. I need a ability to click a method name and jump to class where the method is defined. There are many IDE with similar capability...

Answer

fraxel picture fraxel · Apr 23, 2012

Goto symbol is Ctrl-R (linux), this gives a pop-up-list of all symbol and class definitions in the file, in definition order, and you can jump to what you're after. You could do the same thing with Goto Anything, Ctrl-P and then typing @ and the method name.

Also, there is a Goto Symbol plugin, which lets you jump straight to the definition of the method name your cursor is at, with a key binding or click.

However, both those methods are limited to the current file. If you need to jump to definitions in other files, probably the best solution is the SublimeCodeIntel plugin. It seems to be working pretty well and just by hitting Ctrl-f3 (linux) will open up the file at the definition you want.