问题描述
我使用 Sublime 2 进行 Ruby On Rails 编程.我需要能够单击方法名称并跳转到定义该方法的类.有许多具有类似功能的IDE...
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...
推荐答案
Goto symbol
是 - (linux),这给文件中所有符号和类定义的弹出列表,按定义顺序排列,您可以跳转到您想要的内容.你可以用 Goto Anything
、- 做同样的事情,然后输入 和方法名称.
Goto symbol
is - (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
, - and then typing and the method name.
此外,还有一个 Goto Symbol 插件,可让您直接跳转到定义光标所在的方法名称,使用键绑定或单击.
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.
但是,这两种方法都仅限于当前文件.如果您需要跳转到其他文件中的定义,最好的解决方案可能是 SublimeCodeIntel 插件.它似乎工作得很好,只需点击 - (linux) 就会以您想要的定义打开文件.
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 - (linux) will open up the file at the definition you want.
这篇关于ide sublime2 如何找到方法定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!