I can't comment, so here's a workaround I used: use cmd.exe
in admin mode for this!
First, type in the following:
ftype VimFile="C:\Program Files (x86)\Vim\vim81\gvim.exe" --remote-silent "%1"
This ensures that any filetype (extension) associated to the VimFile
we've set will, by double-click, open in gVim.
Next, choose a file extension (I chose .vim
and .tex
for trial) to associate with VimFile
, and type:
assoc .extension=VimFile
This associates .extension
to VimFile
, and therefore is opened by the gvim.exe
path we set before.
However, this workaround doesn't work with the NERDTree
plugin, so I didn't add the option of --remote-silent "%1"
; bear in mind though that this option only shows the NERDTree
tree indicating the directory of the file you have chosen to double-click.
.txt
is a "protected" file type. ...although that doesn't explain why you can set the default to be notepad++.