Here is how to get going with a vim setup like the one I use.
- Install MacVim (if you want to use vim on OSX)
https://github.com/macvim-dev/macvim/releases
MacVim is an implementation of vim for OS X which is nice b/c it integrates well will the desktop, native key bindings, etc.
- Install pathogen
https://github.com/tpope/vim-pathogen
Follow the instructions there. pathogen provides a sane way to manage vim plugins (the native way is insane so everyone uses this or something similar). Plugins can now be installed by cloning the plugins into ~/.vim/bundle . (Note that pathogen is not the only plugin manager available, but I like it because it is simple.)
- Install ctrlp ...
cd ~/.vim/bundle && git clone https://github.com/kien/ctrlp.vim.git
... and an enhanced matcher for it
cd ~/.vim/bundle && git clone https://github.com/JazzCore/ctrlp-cmatcher.git
... which requires an additional compile step (on OS X)
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
cd ~/.vim/bundle/ctrlp-cmatcher/
./install.sh
CtrlP is a super awesome file finder extension. It's pretty life changing. It also requires a line in your .vimrc (if you don't use the one I provide below)
- Spiff up your ~/.vimrc . vim is configured using its own vim script language. You can configure a lot of vim's behavior.
Note I do some extra configuration for ctrlp and ack.vim plugins.
- Go to town installing other plugins that sound good to you -- although you might want to start slow to get the hang of vanilla vim. As mentioned installing a plugin usually means
git clone
the project into ~/.vim/bundle. Here are some that I use/have used, many of which come from https://github.com/tpope , who is some sort of vim god.
-
https://github.com/tpope/vim-sensible (sensible defaults)
-
https://github.com/tpope/vim-rails (I don't happen to use this one)
-
https://github.com/kchmck/vim-coffee-script (def want this one)
-
https://github.com/mileszs/ack.vim (I have this one installed but don't use it much)
-
https://github.com/scrooloose/nerdtree (file tree browser)
At the behest of @nidd, here is a plugin that claims to do something like what emacs users are used to wrt working directories: https://github.com/yssl/autocwd.vim
-
You may want to install color schemes. There are a lot out there. I use one called vividchalk. Here is a big pack of them: https://github.com/flazz/vim-colorschemes . Drop the color scheme files into ~/.vim/colors to make them available.
-
Learn you some vim! A classic tool to help is
vimtutor
(command line). Obv there are plenty of online resources. And we all love playing vim golf in the slack channel.
Enjoy!