在aptana崩溃了几次之后,偶决定换个稳定又容易上手的编辑器-vim

嗯嗯,用了两天,感觉灰常强大,绝对是懒人利器~

加了几个简单的自定义命令:

快速TortoiseSVN命令

"使用这几个快捷命令的前提是win的环境变量的path包含了TortoiseSVN的bin目录

"diff
command -nargs=0 Svndiff :call Svndiff()
function Svndiff()
   silent execute '!TortoiseProc.exe /command:diff /path:' . expand('%:p')
endfunction

"commit
command -nargs=1 Svncommit :call Svncommit()
function Svncommit(msg)
   silent execute '!TortoiseProc.exe /command:commit /path:' . expand('%:p') . ' /logmsg:' . iconv(a:msg, &enc, "chinese")
endfunction

"update
command -nargs=0 Svnupdate :call Svnupdate()
function Svnupdate()
   silent execute '!TortoiseProc.exe /command:update /path:' . expand('%:p')
endfunction

command -nargs=0 Svnlog :call Svnlog()
function Svnlog()
   silent execute '!TortoiseProc.exe /command:log /path:' . expand('%:p')
endfunction

由于编辑的文件一般都在同一个目录,所以加了一个速得函数

command -nargs=1 Get :call Get()
function Get(f)
   exe ':tabnew d:\xxxx\xxx\xxx\' . a:f
endfunction

恩,继续学习