Skip to content

Instantly share code, notes, and snippets.

@jadc
Created February 18, 2023 03:51
Show Gist options
  • Save jadc/c100224981fc789528c88a48f0435a1a to your computer and use it in GitHub Desktop.
Save jadc/c100224981fc789528c88a48f0435a1a to your computer and use it in GitHub Desktop.
Adds a button to the context menu to open a file in WSL (using nvim, or any editor)
Windows Registry Editor Version 5.00
; Delete old entries
[-HKEY_CLASSES_ROOT\*\shell\Vim]
[-HKEY_CLASSES_ROOT\*\shell\Vim\command]
; Add sub-menu
[HKEY_CLASSES_ROOT\*\shell\Vim]
"MUIVerb"="Edit with Vim"
"Icon"="write.exe"
[HKEY_CLASSES_ROOT\*\shell\Vim\command]
@="wsl.exe nvim \"$(wslpath '%1')\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment