Ide sublime2 how to find a method definition

I am using Sublime 2 to program Ruby On Rails. I need the ability to click on a method name and go to the class where the method is defined. There are many IDEs with a similar feature ...

+50
ruby ruby-on-rails sublimetext
Apr 23 '12 at 7:18
source share
3 answers

Goto symbol Ctrl - R (linux), this gives a pop-up list of all the definitions of characters and classes in the file, in the order of definition, and you can get to what you are after, you can do the same with Goto Anything , Ctrl - P , and then type @ and the name of the method.

In addition, there is a plugin Goto Symbol , which allows you to go directly to determining the name of the method in which your cursor is located, with a key binding or click.

However, both of these methods are limited to the current file. If you need to go to definitions in other files, perhaps the best solution is the SublimeCodeIntel plugin. It seems to work very well, and just by pressing Ctrl - f3 (linux) will open the file in the definition you need.

+50
Apr 23 2018-12-21T00:
source share

Another solution is CTags .

SublimeCodeIntel seems to have a very poor understanding of unresolved issues in the Github tracker. It also crashes for me, perhaps because the code base I'm working on is too big ...

Now I am using the CTags package . There is no "intelligence", but it allows you to easily go to definitions and back, and it is very fast.

+27
May 30 '12 at 4:37
source share

update to sublime text 3, and then place the cursor on the function name and press F12 return ALT + - or in the menu press "Go"

+5
Nov 25 '14 at 18:48
source share



All Articles