Some vim tips
October 22nd, 2008 by Rohansvn diff the current windows file
Put this in your vimrc:
map zs :!svn diff % > /tmp/vimsvndiff<CR><CR>
\ :new<CR>:r /tmp/vimsvndiff<CR>
\ :set ft=diff<CR>
Say you’re editing a checked out file and what to see what changes you’ve done without leaving your VIM session? Just type zs when in normal mode. This will open the diff in a new split window.
Apply tabs to a block of text
I found myself doing this often. Visual selecting some text and then applying a regex to prepend some spaces (or a tab) to each line
Put this in your vimrc:
map <C-i> :s/^/ / :nohlsearch
map <C-p> :s/^ // :nohlsearch
So Control-i will insert 4 spaces for all lines of the selected text. Control-p will remove 4 spaces. Very handy!

November 8th, 2008 at 6:14 am
yo…
thanks…
November 11th, 2008 at 6:34 pm
For the svn diff, I recommend the vcs plugin. Works with other version control systems, and you even commit from within vim. http://www.vim.org/scripts/script.php?script_id=90
For prepending text in front of lines, check out the ‘<>’ commands.
see ‘:help shift-left-right’.
November 15th, 2008 at 7:58 pm
Thanks for that tip on using the ” command.