简体   繁体   English

Emacs中的Ruby导航

[英]Ruby navigation in Emacs

I am trying to use emacs for my rails project. 我正在尝试将emacs用于我的rails项目。 I am kind of fed up with the etag navigation, Its really dumb. 我有点厌倦了etag导航,它真的很愚蠢。 So is there any other way to do source code navigation for ruby in emacs? 那么还有其他方法可以在emacs中为ruby做源代码导航吗?

Note: I also use rinari minor mode. 注意:我也使用rinari次要模式。 Which is kind of intelligent to move between models, views ... But what i want is some kind of jump to definition kind of stuff that you can see in regular IDEs. 这在模型,视图之间移动是一种智能......但我想要的是某种跳转到定义类型的东西,你可以在常规IDE中看到。 Please dont suggest me any IDEs as i am pretty satisfied with Emacs for everything else but this 请不要建议我任何IDE,因为我对Emacs非常满意,除此之外的其他一切

如需更高级的“跳转到定义”,请查看长袍

ECB, or Emacs Code Browser ( http://ecb.sourceforge.net/ ), is great for this. ECB或Emacs代码浏览器( http://ecb.sourceforge.net/ )非常适合这一点。 I use it for Rails Development; 我用它来进行Rails开发; on activation, by default, you'll get a three panel window with folder structure, file list, and method browser. 在激活时,默认情况下,您将获得一个包含文件夹结构,文件列表和方法浏览器的三个面板窗口。

For jumping to specific method definitions, check out the TextMate Minor Mode . 要跳转到特定方法定义,请查看TextMate次模式 the command sT will get you a dialogue that jumps you to the specified method, matching as you type. 命令sT将为您提供一个对话框,跳转到指定的方法,在您键入时进行匹配。

Best Emacs and Rails combination mode is rinari-mode http://rinari.rubyforge.org/ and rhtml-mode 最好的Emacs和Rails组合模式是rinari-mode http://rinari.rubyforge.org/和rhtml-mode

It is available on melpa. 它可以在melpa上使用。 Just run 赶紧跑

M-x list-packages

And select rinari-mode and rhtml-mode 并选择rinari-mode和rhtml-mode

rinari-mode has advance navigation system. rinari-mode拥有先进的导航系统。 it also supports etags http://rinari.rubyforge.org/Navigation.html#Navigation 它还支持etags http://rinari.rubyforge.org/Navigation.html#Navigation

(setq rinari-tags-file-name "TAGS")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM