To enable hosts file edit using a gvim shortcut, without breaking explorer
Edit with vim right-click action …
- create a shortcut with command:
"C:\Program Files (x86)\Vim\vim82\gvim.exe" "C:\windows\system32\drivers\etc\hosts" - on the shortcut property page, under the
Shortcuttab, choose “Advanced” and check “Run as administrator”
DO NOT go to shortcut
Compatabilitytab and select “Run this program as an administrator” - this will make gvim ALWAYS run as admin and right-click “Edit with Vim…” option will be broken, reportinggvimext.dll error creating process: check if gvim is in your path!