New install of Vim 8.1.1 on Windows 10 64bit. Also running cygwin.
From a Windows Explorer r-click context menu for a file, the "Edit with Vim" produces a cmd.exe window with:
C:\WINDOWS\system32\cmd.exe /c <symlink>ÿþ/
The system cannot find the file specified.
shell returned 1
Hit any key to close this window...
I hit any key and get a Vim alert dialog saying
:!<symlink>ÿþ
Clicking ok then continues on to successfully open the file in gVim.
If I select an option to "Edit with existing vim <some already open file>", it works fine, opening up the target file in the specified existing Vim window.
I did find https://superuser.com/questions/753537/windows-vim-symlink-config-file-persistent-error. This talks about symlinks to vimrc/gvimrc files, but I case insensitive check of_all_ the files on disk with a name containing "vim" and the only ones with symlinks are for cygwin versions of things like "evim", "rvim", etc.
% for f in $(locate -i vim); do file "$f"; done | grep -i symbolic
(Note: had to muck w/ $IFS to allow spaces in Windows filenames.)
I also tried uninstalling/reinstalling VIM.
After yet more digging I found (using process explorer on the blocking cmd window) that gvim is actually executing vimrun
"C:\Program Files (x86)\Vim\vim81\vimrun" C:\WINDOWS\system32\cmd.exe /c ÿþ/
From this I found that executing gvim.exe from that vim81 folder does the same thing. It's having trouble finding the _vimrc
file. If I specify -u <path to _vimrc>
it works. The default location of _vimrc seems to be ...\Vim\
. Just copying _vimrc to ...\Vim\vim81\
has no effect.
So now the questions maybe become
- How to I make _vimrc findable by gvim.exe?
- Do I need to hack the registry to add
-u
? - If so where exactly?
"...\gvim.exe" "%1"
occurs multiply in the reg
Been living with this for months now, but would really like to get it figured out. Thanks in advance!
ÿþ
is how the UTF-16 byte order mark (BOM) shows when it's incorrectly interpreted as UTF-8, or when someone uses a BOM with UTF-8 (which you shouldn't but sometimes people do). I don't know if it's related and don't really know more than that, but that's the origin of those characters.