I'm using the Cream version of gVim, and i'd like to make an alias to open files from a Cygwin shell in Cream. Running the gVim executable from Cygwin gives the following error (in a Windows cmd window) :

/bin/zsh /c <symlink> ■c
The system cannot find the file specified.
shell returned 1
Hit any key to close this window..



cyg-wrapper solves this issue -- by applying realpath+cygpath.

EDIT: Yesterday, I've seen this on vim mailing list. It looks like a recent regression.


I had this issue, and it turned out to be a corrupted _vimrc file. My _vimrc file somehow had the following contents:

!<symlink> ... some non-human readable characters ...

Remove or fix the _vimrc file, and the error should go away.


You get that error because your PATH does not include the parent directory of the gvim executable. Assuming that you installed the latest version of Vim, 7.3, in the default location, this alias should work.

alias gvim='/cygdrive/c/Program\ Files/vim/vim73/gvim.exe'
  • Thanks, but it still gives the same error. I did notice one thing though: when I close the cmd window, there's a gVIM dialog box underneath with a single button with the message :!<symlink>ÿþc. It suppose it has something to do with the fact that gvim.exe is actually a Windows symlink and that Cygwin can't properly handle it. When I click on it gVIM works fine but it's still an annoyance... – Andrei Aug 24 '10 at 13:22
  • That used to work. I just got back to my Cygwin 1.7 system which has a fresh install of Vim from the Cream site and verified the behavior you're seeing. I'll look into it. – garyjohn Aug 26 '10 at 16:19
  • 1
    The system on which this worked for me has a ~/_vimrc shared by both Windows gvim and Cygwin vim. The system on which this fails has a $HOME/.vimrc that is a Cygwin symlink to the regular file $HOMEDRIVE/$HOMEDIR/_vimrc. I "fixed" the problem by invoking gvim.exe like this: ( unset HOME; /cygdrive/c/Program\ Files\Vim/vim73/gvim.exe; ), which caused gvim.exe to read the real file instead of the symlink. So the problem could be as you said that gvim.exe is a Windows symlink or that your ~/.vimrc is a Cygwin symlink. I didn't try Luc's suggestion. – garyjohn Aug 26 '10 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.