Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim and Ruby on Rails [closed]

I have got Mac on work, Ubuntu on my notebook, CentOS on my server, Windows at my girlfriend place and my VM. I used to work on gMate (Ubuntu) that is very good and not far from TextMate (on my Mac), e.texteditor (Windows) and nano on CentOs. Now I want to install one editor for all my environments. I can choose vim or emacs. I think vim is more simple to manage :).

I know that there are a bunch of rails castomizations (plugins): from Akita, scrooloose, Pope etc. I've tasted all of them sometime ago. All of them was buggy (I think the problem is in my hands).

So what I really need now is to choose one plugin which is simple to install.

And second big deal is set of your favorite vim commands like:

  • Open folder as project (and open the folder as project and exclude some subfolders from public dir)
  • Fast open file from my project
  • Open reffering controller/model/helper/etc
  • Extract partial
  • Using snippets
  • Code autocomplete
  • Rails console / Terminal / Git support
  • Working with tabs

and other useful stuff from *Mates.

And I want to set vim face: like file manager on the left, console on the bottom etc. What should I do for it.

After bounty: Thanks to everybody! Going to win the vim!

like image 884
fl00r Avatar asked Mar 21 '11 09:03

fl00r


4 Answers

Edit: Actually someone already mentioned janus, but I am leaving this up because it has more info on what janus is.

I am a bit surprised no one has mentioned the vim 'distribution' Janus yet:

https://github.com/carlhuda/janus

Named after the God of Beginnings and Ends, it includes many of the plugins that people have mentioned above. While I don't use it myself it gets high marks from co-workers who are now former textmate users. Frankly if I didn't already have so much invested in my own vim configuration I would totally use it.

It is really oriented at Ruby/Rails developers switching from Textmate to vim. It has things like the command t(find file) and the project drawer bound to the commands you are already familiar with from Textmate.

Janus is sort of like a gateway drug to vim really. It gets you comfortable with familiarity from Textmate then blows your mind with vim's power.

It is very easy to install on linux(gvim) and osx(MacVim), however I am not sure how it would run on windows.

Now go enjoy vim. :)

Edit: You mentioned you would like a terminal split as well, Janus includes the ConqueTerm plugin bound to command e for opening a terminal.

like image 163
Alan Peabody Avatar answered Nov 04 '22 02:11

Alan Peabody


rails.vim for:

  • Open reffering controller/model/helper/etc
  • Extract partial
  • Rails console (calling scripts easily)
  • Code autocomplete

snipmate.vim for:

  • Using snippets

project.vim for:

  • Open folder as project (and open the folder as project and exclude some subfolders from public dir)

command-t.vim for:

  • Fast open file from my project

fugitive.vim for:

  • Git support

pathogen.vim for managing all those plugins!

like image 40
PDug Avatar answered Nov 04 '22 03:11

PDug


You might want to try out the .vimrc files of Carl Huda's janus

like image 4
zengr Avatar answered Nov 04 '22 03:11

zengr


I forked this at Github when I was getting started developing ruby apps using vim. Then I decided to maintain my own files.

https://github.com/akitaonrails/vimfiles

It has Tim's plugins, Nerd tree, Command-T, snipmate, fugitive, rails and a lot more besides.

It is maintained to support win, linux and mac users.

Here is the original article that got me interested.

http://www.akitaonrails.com/2009/04/27/the-best-environment-for-rails-on-windows-part-2

like image 3
bluekeys Avatar answered Nov 04 '22 03:11

bluekeys