First a quick thanks to everyone who has posted their
.vimrc files and vim setups online so wannabe vim users like me can learn and copy from :o). Some of the more helpful vim setups I have stumbled across include:
- Good ideas from Steve Francia's vim setup at spf13-vim
- Lots of tips and tricks from Stackoverflow
- The vim setup from Janus (specifically for MacVim)
For myself I store everything in the
.vim folder in my home directory. Though in theory you could clone the project anywhere, you will just have to create an additional symlink from
.vim to the project folder. To get started run the following:
git clone git://github.com/cengebretson/vim.git ~/.vim
Create a symlink to the new
.vim directory (or wherever you cloned the project) for the
ln -s ~/.vim/vimrc ~/.vimrc
For the most part I try to use the amazing pathogen plugin and git submodules to maintain the different vim plugins that I use. The easiest way to load and update all of the git submodules is to run the following commands (assumes you are using
.vim for your vim setup):
cd ~/.vim git submodule init git submodule update
To later update the submodules to the their latest versions from github you can run the following command.
git submodule -q foreach git pull -q origin master
Adding new Submodules
To add a new submodule to to the pathogen bundle folder you can use the following steps...
git submodule add https://github.com/cengebretson/super-duper-vim-plugin.git bundle/super-duper git submodule init git submodule update
Removing unwanted Submodules
To remove a submodule that you don't want to use, follow the steps below.
- Delete the relevant line from the
- Delete the relevant section from
git rm --cached path_to_submodule(with no trailing slash).
- Commit your changes and delete the now untracked submodule files.
Vim feels like one of those tools that you could work with for years but still learn new things every day. Here are some of the sites that have helped me:
- Tips from www.zinkwazi.com
- Favorite vim tricks from Stackoverflow
- Great intro to vim at Walking without Crutches
- Another good writeup on getting started with Vim
Setup macvim as default editor
duti to make macvim the default editor for specific file types. Link to Duti website. For example to make macvim default for text files...
duti -s org.vim.macvim public.plain-text all
Make use of Caps Lock key
Use Seil to override the default action of the capslock key, for example to make caps lock act as esc key. Link to Seil
Chris Engebretson - snarkydog.com