My vim config
Vim script
Pull request Compare This branch is 41 commits ahead, 150 commits behind kerryb:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
colors
.gitignore
README.md
neovim_setup
vimrc

README.md

Installation

If necessary, backup and remove your /.vim directory and /.vimrc file.

Clone this repository to ~/git:

git clone git://github.com/alkesh/vim-config.git ~/.vim

(If you're behind a firewall that blocks port 9418, replace git: with https: in the above URL.)

Alternatively, if for some bizarre reason you don't have git installed, you can download a zip or tar file using the link on GitHub.

Symlink .vimrc:

ln -s ~/.vim/vimrc ~/.vimrc

If you are running neovim, run the setup script:

./neovim_setup

Install Vundle:

git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim

Finally, install the plugins:

vim +PluginInstall +qall

Keeping up-to-date

cd ~/.vim
git pull

Then in vim:

:PluginInstall

Local Customisation

Local changes (eg if you prefer a different font or colour scheme) can either be made in a branch, or in ~/.vimrc.local.

Included Plugins

See the plugins' web pages for more information. The keybindings listed are mostly just those defined or overridden locally, not the ones provided by default.

Plugins are installed in their own directories under bundle, thanks to Pathogen.

Abolish

Work with several variants of a word at once (more)

ack

Plugin for the Perl module / CLI script 'ack' (more)

Align

Help folks to align text, eqns, declarations, tables, etc (more)

Keybindings

,tlt
Align LaTEX tables (to avoid clashing with our existing ,tt mapping)
,t>
Align on =>

bufexplorer

Buffer explorer/browser (more)

Keybindings

,.
Show buffer explorer

CtrlP

Fast file navigation for VIM (more)

Written in pure vimscript, so no need to compile anything (unlike Command-T)

Keybindings

ctrl-p
The default keybinding
,t
For those used to using Command-T

dash.vim

Search for word under cursor in Dash. (more)

Keybindings

,d
Search for word under cursor in Dash

EasyGrep

Fast and Easy Find and Replace Across Multiple Files (more)

endwise

Wisely add "end" in ruby, endfunction/endif/more in vim script, etc (more)

Extradite

Brings up the commit log of the current file. In the log view (more)

Keybindings

,x
Open commit history for current file

Fugitive

A Git wrapper so awesome, it should be illegal (more)

markdown

Syntax highlighting for Markdown (more)

matchit

Extended % matching for HTML, LaTeX, and many other languages (more)

NERD tree

A tree explorer plugin for navigating the filesystem (more)

Keybindings

,m
Show/hide NERDTree
,f
Show current file in tree

nerdcommenter

A plugin that allows for easy commenting of code for many filetypes (more)

ragtag

A set of mappings for HTML, XML, PHP, ASP, eRuby, JSP, and more (more)

If you have already typed 'foo', the following shortcuts apply (with the cursor position marked by ^):

<C-X>=
foo<%= ^ %>
<C-X>+
<%= foo^ %>
<C-X>-
foo<% ^ %>
<C-X>_
<% foo^ %>
<C-X>'
foo<%# ^ %>
<C-X>"
<%# foo^ %>
<C-X><Space>
<foo>^</foo>
<C-X><CR>
<foo>
^
</foo>
<C-X>/
Last HTML tag closed
<C-X>!
<!DOCTYPE...>/<?xml ...?> (menu)
<C-X>@
<link rel="stylesheet" ...>
<C-X>#
<meta http-equiv="Content-Type" ... /> ragtag-CTRL-X_#
<C-X>$
<script src="/javascripts/^.js"></script> ragtag-CTRL-X_$

rails

Ruby on Rails: easy file navigation, enhanced syntax highlighting, and more (more)

Keybindings

,r
run rake

rake

It's like rails.vim without the rails (more)

repeat

Use the repeat command (.) with supported plugins (more)

## ruby

Ruby support (newer than the version released with vim). (more)

ruby-refactoring

Refactoring tool for Ruby in vim! (more)

See relish documentation for examples.

SuperTab

Do all your insert-mode completion with Tab (more)

surround

Delete/change/add parentheses/quotes/XML-tags/much more with ease (more)

syntastic

Automatic syntax checking (more)

Tabular

Configurable, flexible, intuitive text aligning (more)

Keybindings

,aa
(when text is selected) format tables made with pipes (|)

unimpaired

Pairs of handy bracket maps (more)

vim-multiple-cursors

Multiple selection similar to Sublime Text (more)

ZoomWin (23)

Zoom in/out of windows (toggle between one window and multi-window) (more)

Keybindings

,z
Zoom

Other Keybindings

ctrl-]
Jump to definition (needs exuberant ctags installed - see Tags section below)
,c
Hide/show tabs and trailing spaces
,h
Hide search highlighting
,rr
Run ruby file
,,
Run rspec on current file
,rt
Run run_tags script (assuming it's installed and in the path)
,s
Show/hide spelling errors
,sw
Strip trailing whitespace
,w
Toggle word wrapping
,p
Switch to 'projector mode' (large font, light colour scheme)
RB
Open Ruby docs in browser for word under cursor
RR
Open Rails docs in browser for word under cursor

Tags

The ctrl-] and ,rt shortcuts need both exuberant ctags, and the run_tags script installed.

The run_tags scripts are available for ubuntu (script/raw) and OS X (script/raw)

Other Commands

:SudoW
Save using sudo (run sudo -v in terminal first)

Vim Resources

See Kerry's vim bookmarks on pinboard. Also, Kerry seems to have moved on from using his own config, to using this one: https://github.com/AdamWhittingham/vim-config