Skip to content

Instantly share code, notes, and snippets.

@winstxnhdw
Forked from JAffleck/editWithNeoVIm.reg
Last active December 24, 2022 16:42
Show Gist options
  • Save winstxnhdw/59cad83779ccac38d7e1bc3a17cbfde6 to your computer and use it in GitHub Desktop.
Save winstxnhdw/59cad83779ccac38d7e1bc3a17cbfde6 to your computer and use it in GitHub Desktop.
Adds "Edit with Neovim" to the Windows 10 context menu for the Windows Terminal. See original fork for Neovim-qt instead.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Neovim]
@="Edit with Neovim"
"Icon"="C:\\tools\\neovim\\Neovim\\bin\\nvim-qt.exe"
[HKEY_CLASSES_ROOT\*\shell\Neovim\command]
@="wt new-tab PowerShell nvim (Get-Item -LiteralPath %1).FullName"
@winstxnhdw
Copy link
Author

winstxnhdw commented Dec 1, 2022

If you have issues with this, you may have inadvertently modified your C:\Program Files\WindowsApps directory. See microsoft/terminal#9452

A solution to this is replacing the following command

wt new-tab PowerShell nvim (Get-Item -LiteralPath %1).FullName

with the exact path to wt.exe

"C:\Users\<user>\AppData\Local\Microsoft\WindowsApps" new-tab PowerShell nvim (Get-Item -LiteralPath %1).FullName

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment