将 vim 与 ruby/ruby on Rails 一起使用的提示和技巧
我是那些没有在任何 Ruby/Ruby on Rails 工作中使用 TextMate 的开发人员之一。我在这个领域特别忠诚的是 vim。在将 vim 与 Ruby 和/或 Ruby on Rails 结合使用以使您在工作时尽可能高效时,您最喜欢的提示/技巧是什么?
I'm one of those developers who isn't using TextMate with any of his Ruby/Ruby on Rails work. My particular loyalty in this arena lies with vim. What are your favorite tips/tricks for using vim with Ruby and/or Ruby on Rails to make you as efficient as possible when working?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
最重要的
是 获取 rails.vim 的副本,它对数百万用户来说非常棒水平。 阅读文档。有太多的提示,:Rview customer、:RSmodel foo、:Rinvert、gf、:Rextract、:Rake 等等。您可能还需要 NERDTree 来轻松导航(您可以访问它)使用 :Rtree)
第二重要的是
在 twitter 上关注 tpope(fugative、rails.vim、haml.vim、vividchalk 主题、cucumber.vim 等的作者),他似乎经常发布与 Rails vim 插件相关的新内容(无论是语法高亮还是 git 集成)。
Most important
Get a copy of rails.vim it is awesome on millions of levels. Read the doc. There are way too many tips, :Rview customer, :RSmodel foo, :Rinvert, gf, :Rextract, :Rake and the list goes on and on. You will probably want NERDTree as well for easy navigation (which you can access using :Rtree)
Second most important
Follow tpope on twitter (the author of fugative, rails.vim, haml.vim, vividchalk theme, cucumber.vim and so on), he seems to be posting new related to Rails vim plugins quite regularly (be it syntax highlighting or git integration).
您可能想查看我的 ruby/rails 特定 vimfiles。
它是一个有用的起点,并且捆绑和配置了许多有用的 Ruby/Rails 插件。
You might want to checkout my ruby/rails specific vimfiles.
Its a useful starting point and has many useful Ruby/Rails plugins bundled and configured.
Textmate 真正糟糕的一件事是它不能在 Linux 上运行。我的 vim/gvim 配置在 Mac、Windows 和 Linux 上是相同的。相同的字体、相同的主题、相同的插件和相同的自定义。
我主要使用 Textmate 来获取片段和快速评估以便在此处发布。
The one thing that really sucks about Textmate is that it doesn't run on Linux. My vim/gvim config is the same on Mac, Windows and Linux. Same fonts, same themes, same plugins and same customizations.
I mostly use Textmate for snippets and quick evaluations for posting here.
我写了一篇关于在 VIM 中使用 Textmate 功能(尤其是 Rails 相关功能)的深入指南。这与这个问题非常相关。
http://www.jackkinsella.ie/2011/09/05 /textmate-to-vim.html
I wrote an in depth guide on using Textmate features (especially Rails related features) in VIM. It's very relevant to this question.
http://www.jackkinsella.ie/2011/09/05/textmate-to-vim.html
我不使用 vim,相反,我就像数百万使用 Textmate 的开发人员一样。尽管如此,一位同事确实使用 vim/gvim。
通过观察他的工作,我希望在 Textmate 中能做的一件事就是能够轻松地同时处理多个文件。基本上,你可以轻松地操作多个窗口,这非常方便。
I don't use vim, instead, I'm like those millions of developers using Textmate. Nevertheless, a colleague does use vim/gvim.
By looking at him work, one of the things I wish I could do in Textmate is the ease of working on multiple files at the same time. Basically, you can easily manipulate multiple windows, which is quite handy.