This is my vim configuration. To use this, you'll need to clone it into some
folder (I use ~/.vim
, but you can use whatever you prefer) and
then link ~/.vimrc
to this folder's vimrc:
git clone --recursive http://github.com/rameshvs/dotvim $HOME/.vim
ln -s $HOME/.vim/vimrc $HOME/.vimrc
touch $HOME/.vim/viminfo
ln -s $HOME/.vim/viminfo $HOME/.viminfo
I've tested this on Mac OS X 10.8 and a few flavors of linux. I can't make any guarantees, but I do try to make sure it works across all platforms that I use.
Many of the settings in vimrc
are documented therein, and vim's excellent
:help
explains things even better.
I organize my plugins using git submodules and pathogen. This means that you need to do a recursive clone in order to get all the plugins!
To add a plugin conveniently from the command line, you could define the following function at the command prompt:
$ addrepo() { git submodule add https://github.com/$1 "bundle/$(echo $1 | cut -d "/" -f 2)"; };
Once you've done that, you can run addrepo <github user>/<github project>
to add the corresponding git repository.
For example, to add the plugin vim-commentary from
https://github.com/tpope/vim-commentary
, use the following command from the
command prompt after defining addrepo
as above:
$ addrepo tpope/vim-commentary
Here are all the plugins included here along with brief descriptions:
- vim-commentary: makes it easier to comment stuff out
- vim-repeat: enables repeating of plugin commands
- vim-surround: enables selection within parens, etc
- vim-markdown: syntax highlighting for markdown
- solarized: the best color scheme
- rainbow_parentheses: highlight parens with many colors
- vim-arpeggio: arbitrary pairs of keys can be commands
- ctrlp: the best way to manage & find files/buffers
- vim-easymotion: use
<leader>+<movement>
to move around much faster - syntastic: linting/error checking
- bufkill: enables ":BD" to remove a buffer without closing the window (i.e., mimicking emacs's C-x k)
- rename: use ":rename" to rename