New issue 250 by pkufranky: Can't open file C:\Program
Files\Git\share\vim\vim72\syntax/nosyntax.vim
http://code.google.com/p/msysgit/issues/detail?id=250
When my .vimrc uses "syntax on", and try vim -D , i got
Entering Debug mode. Type "cont" to continue.
C:\Program Files\Git\share\vim\vimrc
line 3: set ai " set auto-indenting on for
programming
> cont
Error detected while processing C:\Program
Files\Git\share\vim\vim72\syntax\syntax.vim:
line 15:
E484: Can't open file C:\Program
Files\Git\share\vim\vim72\syntax/nosyntax.vim
Press ENTER or type command to continue
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
The version is Git-1.6.2.2-preview20090408.exe
Comment #2 on issue 250 by johannes.schindelin: Can't open file C:\Program
Files\Git\share\vim\vim72\syntax/nosyntax.vim
http://code.google.com/p/msysgit/issues/detail?id=250
If you want to play games with vi, please use msysGit.
There is a workaround for this issue. I unfortunately, didn't track it
down to its
root cause, but to get it working, just tweak the ~/.gitconfig and have the
editor
set explicitly and without spaces. Below is what the relevant lines look
like from
my .gitconfig
[core]
editor = C:\\Progra~1\\Vim\\vim72\\vim.exe
Hope this helps.
If you compare the paths in the original report and in your .gitconfig, you
will
realize that you no longer use Git's vi, so it has nothing to do with
spaces in the path.
The proper fix for the issue is to use msysGit, which contains all the
needed files.
syntax/nosyntax.vim is indeed missing. At first I ignored this issue after
your
WontFix, but today looked into it because of the activity. The subject
should
rather have been called "Can't disable syntax highlighting", since this is
actually
the real problem besides the error message. Typing ":syntax off" produces
an error
and syntax highlighting stays active.
Attachments:
0001-Git-installer-add-file-syntax-nosyntax.vim-for-Vim.patch 1.1 KB
pkufranky, can you try and verify the fix so that we can close this issue?
If you don't want to build the installer yourself, you can just download
the file
nosyntax.vim from
http://repo.or.cz/w/msysgit.git?a=blob_plain;f=share/vim/vim72/syntax/nosyntax.vim;hb=devel
and put it into C:\Program Files\Git\share\vim\vim72\syntax\
Thanks very much, it fixes the issue.