Tuesday, May 27, 2008

Vim tips for SVN

function! SVN_diff()
let fn = expand('%:p')
vnew +setl\ ft=diff\ bt=nowrite
exe ":.!svn diff -r BASE " . fn
unlet fn
endfunction

map ,v :call SVN_diff()

Paste above code in your ~/.vimrc, then you can use `,v' to display a diff in a vertical-split window.

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home