Fix for MacVim Syntax Error; Throws “Only one file name allowed”
2011 February 25
I keep a lot of my user installed applications in /Applications/User Utilities. Keeps some modicum of organization and reduces a bit of clutter in my /Applications directory. After moving MacVim to this directory, I began getting several errors when opening files. They were all of the same type.
E172: Only one file name allowedWith occurrances on several lines in the runtime/syntax/vim.vim file. Opening the file, I found syntax like the following
exe "syn include @vimPerlScript ".s:perlpathYou may notice the perpath variable is where the problem lies. the space gives the appearance of two arguments instead of a single path. We can prevent this by using fnameescape
For me, these errors occurred on lines 585, 607, and 628.
- Line 585
exe "syn include @vimPerlScript ".s:perlpath
becomesexe "syn include @vimPerlScript ".s:fnameescape(perlpath)
- Line 607
exe "syn include @vimRubyScript ".s:rubypath
becomesexe "syn include @vimRubyScript ".s:fnameescape(rubypath)
- Line 628
exe "syn include @vimPythonScript ".s:pythonpath
becomesexe "syn include @vimPythonScript ".s:fnameescape(pythonpath)
All done.
No comments yet

