Thinking of moving from TextMate to vim for Rails dev. What do I need?

前端 未结 10 1807
暖寄归人
暖寄归人 2021-01-29 22:28

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 enviro

10条回答
  •  走了就别回头了
    2021-01-29 23:22

    All of the other answers plus:

    Ability to have a (preferably) collapsible project tree visible either at all times or easily toggle-able.

    • The project.vim plugin doesn't really work like TextMate's Project drawer but it's close.
    • With NERDTree, you can setup bookmarks and make it work a little like a project drawer.
    • :help mkview and :help mksession can help, too.

    Ability to see SCM status at a glance, either within this project tree (preferable) or otherwise. (I use git almost exclusively if this makes any difference.)

    • vcscommand.vim provides the same set of commands for multiple SCMs, it works with Git, SVN, Mercurial…
    • You can use the aforementioned fugitive plugin to display the Git status in the status line, :help fugitive-statusline.

    Being able to view a side-by-side diff from within vim would be great too

    • fugitive provides the :Gdiff command that does just that.
    • A recently released plugin called Gitv tries to emulate GitK in Vim. I like it a lot and the author is very responsive. In the tree view, hit to open a previous commit in another window and D to see a double diff.

    Code completion, if possible

    • There are a few solutions, if you don't need it to be automatic , and will be more than enough, if you want "autocompletion" you may try these few plugins. My favorite is autocomplpop.

提交回复
热议问题