function VDiff() new if isdirectory(getcwd() . "/.svn") r!svn di endif 1d set nomod ft=diff endfunc nmap :call VDiff()