When I put the following in ~/.vimrc and save it,
syntax on
vim get errors while opening. I think there are some vim configuration conflicts. Herewith the errors:
Error detected while processing /Users/Home/.vimrc: line 1: E484:
Can't open file /usr/share/vim/syntax/syntax.vim
I'd appreciate if you can help to get rid of this problem. I'm running osx snow loepard 6.8
Best Answer
A quick and dirty fix is to create the missing file with contents:
which is valid (at the very least) for
vim
7.0 through 7.3, as the file hasn't changed in years.If you take a closer look, though, it is quite surprising that
vim
tries to open/usr/share/vim/syntax/syntax.vim
: I checked the path ofsyntax.vim
on different OS X versions and this is what I got:OS X 10.8.3 "Mountain Lion"
Mac OS X 10.5.8 "Leopard"
I'd expect Mac OS X "Snow Leopard" to follow a similar pattern, so why is the path different? What has changed in
vim
, have you compiled a newer version or replaced it?It could also be that
/usr/share/vim/vim<version>/syntax/syntax.vim
exists, in which case, as an alternative, you could create a link: