考虑从 TextMate 迁移到用于 Rails 开发的 vim.我需要什么? [英] Thinking of moving from TextMate to vim for Rails dev. What do I need?

查看:45
本文介绍了考虑从 TextMate 迁移到用于 Rails 开发的 vim.我需要什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我几乎专门从事 Ruby on Rails 开发.我目前使用 TextMate 在 OS X 中进行开发.我有一个虚拟机正在运行,以尽可能模拟我的应用程序将部署到的环境,并且我将 Samba 共享上的代码从 VM 来宾挂载到 OS X.从那里我打开 TextMate 和代码.

I do Ruby on Rails development pretty much exclusively. I currently develop in OS X using TextMate. I have a virtual machine running to emulate as closely as possible the environment my app will be deployed into, and I mount the code on a Samba share into OS X from the VM guest. From there I open with TextMate and code away.

我开始认为通过适当的插件和花时间学习,我可以直接在 VM 上使用 vim 提高工作效率.现在我的 TextMate 基本上是库存,但我确实发现 ProjectPlus 插件不可或缺.我正在寻找的是 vim 资源和插件(如果这是正确的术语)的一些建议,以密切模拟我不愿意在 TextMate 中放弃的功能.或者至少,我应该愿意放弃它们的令人信服的理由.这是一个简短的列表:

I'm beginning to think that with the proper plugins and time spent learning, I could be much more productive in vim directly on the VM. Right now my TextMate is basically stock, though I do find the ProjectPlus plugin indispensable. What I'm looking for are some suggestions of vim resources and plugins (if that's the right terminology) to closely emulate the features I am unwilling to give up in TextMate. Or at least, compelling reasons why I should be willing to give them up. Here's a short list:

  • 能够让(最好)可折叠的项目树始终可见或可轻松切换.
  • 能够一目了然地查看 SCM 状态,无论是在此项目树中(首选)还是其他方式.(如果这有什么不同,我几乎只使用 git.)
    • 能够从 vim 中查看并排差异也很棒

    推荐答案

    NERD Tree 插件为您提供了一个可折叠的项目树.就个人而言,我发现 netrw 插件绰绰有余,而且通常会安装与 Vim.虽然 NERD 树感觉好像它试图模仿其他 IDE(和 TextMate 的项目抽屉)的行为,但我觉得 netrw 插件以 Vim 的方式做事.我建议你两个都试试,看看你更喜欢哪一个.

    The NERD Tree plugin gives you a collapsible project tree. Personally, I find that the netrw plugin is more than sufficient, and this usually comes installed with Vim. Whereas the NERD tree feels as though it tries to emulate the behaviour of other IDEs (and TextMate's project drawer), I feel that the netrw plugin does things the Vim way. I suggest you try both out, and see which one you prefer.

    fugitive 插件为 Vim 提供了一个 git 接口(参见Vimcasts:部分 1, 2345).

    The fugitive plugin provides a git interface to Vim (See Vimcasts: parts 1, 2, 3, 4 and 5).

    ack 插件非常适合搜索整个项目.您需要阅读 Vim 的 quickfix 列表以充分利用它.

    The ack plugin is great for searching an entire project. You'll want to read up on Vim's quickfix list to get the most out of this.

    TextMate 的单词补全由 escshift-esc 触发.在 Vim 中,您可以使用 ctrl自动完成 功能>-nctrl-p 处于插入模式.检查 :help ins-completion(很多!)更多信息.

    TextMate's word completion is triggered with esc, and shift-esc. In Vim, you get similar autocomplete functionality using ctrl-n and ctrl-p in insert mode. Check :help ins-completion for (much!) more info.

    我正在 vimcasts.org 上播放一系列关于学习 Vim 的截屏视频.我的背景是 TextMate,但我已经全职使用 Vim 一段时间了.在我写这篇文章的时候,我只有 6 集,但我确实计划在未来的剧集中涵盖你提出的每一点.我会试着回来编辑这个答案,并在它们可用时提供指向截屏视频的链接.

    I am running a series of screencasts about learning Vim over at vimcasts.org. My background is with TextMate, but I've been using Vim fulltime for a while now. As I write this, I'm only 6 episodes in, but I do plan on covering each of the points you've raised in future episodes. I'll try and come back to edit this answer with links to the screencasts as they become available.

    这篇关于考虑从 TextMate 迁移到用于 Rails 开发的 vim.我需要什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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