ide sublime2 如何找到方法定义 [英] ide sublime2 how to find method definition

查看:37
本文介绍了ide sublime2 如何找到方法定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 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 symbolCtrl-R (linux),这给文件中所有符号和类定义的弹出列表,按定义顺序排列,您可以跳转到您想要的内容.你可以用 Goto AnythingCtrl-P 做同样的事情,然后输入 @ 和方法名称.

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.

此外,还有一个 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 插件.它似乎工作得很好,只需点击 Ctrl-f3 (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 Ctrl-f3 (linux) will open up the file at the definition you want.

这篇关于ide sublime2 如何找到方法定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆