Windows 7 x64에서 64bit로 빌드된 vim을 사용 중인데 VCSCommand로 svn을 사용하려고 하면 'no suitable plugin' 오류가 발생한다.
원인은 외부 명령 실행시 'svn' info . 식으로 실행 명령에 ' 가 붙기 때문인데 vcssvn.vim 파일을 수정한다.
--- a/plugin/vcssvn.vim
+++ b/plugin/vcssvn.vim
@@ -72,6 +72,9 @@ let s:svnFunctions = {}
" Returns the executable used to invoke git suitable for use in a shell
" command.
function! s:Executable()
+ if has ('win32')
+ return VCSCommandGetOption('VCSCommandSVNExec', 'svn')
+ endif
return shellescape(VCSCommandGetOption('VCSCommandSVNExec', 'svn'))
endfunction
vcssvn.vim을 수정하면 'no suitable plugin' 오류는 나지 않지만 VCSInfo 등의 명령을 실행할 때 파일 명에 ' 가 붙어서 실패하게 된다.
이 문제는 vcscommand.vim을 수정해야 한다.
--- a/plugin/vcscommand.vim
+++ b/plugin/vcscommand.vim
@@ -1235,7 +1235,11 @@ function! VCSCommandDoCommand(cmd, cmdName, statusText, options)
if match(a:cmd, '<VCSCOMMANDFILE>') > 0
let fullCmd = substitute(a:cmd, '<VCSCOMMANDFILE>', fileName, 'g')
else
- let fullCmd = a:cmd . ' -- ' . shellescape(fileName)
+ if has ('win32')
+ let fullCmd = a:cmd . ' -- "' . fileName .'"'
+ else
+ let fullCmd = a:cmd . ' -- ' . shellescape(fileName)
+ endif
endif
" Change to the directory of the current buffer. This is done for CVS, but