Created
June 17, 2018 05:42
-
-
Save JAffleck/2ba6ca0bd0d5545fd17c396357b9abf0 to your computer and use it in GitHub Desktop.
Neovim - Edit With Neovim WIndows Context menu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | |
@="\"C:\\tools\\neovim\\Neovim\\bin\\nvim-qt.exe\" \"%1\"" |
Thanks for this post, I created this Add_NeoVim_to_context_menu.reg to add both Neovim and Neovim-Qt to file, directory and background context menu (if you install Neovim as administrator, it should be at C:\Program Files\Neovim, otherwise please change the "C:\Program Files\Neovim" to your current Neovim directory (remember the double-backslash)):
Windows Registry Editor Version 5.00
;; Neovim-Qt
[HKEY_CLASSES_ROOT\*\shell\nvim-qt]
@="Edit with Neovim-Qt"
"Icon"="\"C:\\Program Files\\Neovim\\bin\\nvim-qt.exe\""
[HKEY_CLASSES_ROOT\*\shell\nvim-qt\command]
@="\"C:\\Program Files\\Neovim\\bin\\nvim-qt.exe\" \"%1\""
[HKEY_CLASSES_ROOT\Directory\shell\nvim-qt]
@="Open with Neovim-Qt"
"Icon"="\"C:\\Program Files\\Neovim\\bin\\nvim-qt.exe\""
[HKEY_CLASSES_ROOT\Directory\shell\nvim-qt\command]
@="\"C:\\Program Files\\Neovim\\bin\\nvim-qt.exe\" \"%1\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\nvim-qt]
@="Open Neovim-Qt here"
"Icon"="\"C:\\Program Files\\Neovim\\bin\\nvim-qt.exe\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\nvim-qt\command]
@="\"C:\\Program Files\\Neovim\\bin\\nvim-qt.exe\" \"%v\""
;; NeoVim
[HKEY_CLASSES_ROOT\*\shell\nvim]
@="Edit with Neovim"
"Icon"="\"C:\\Program Files\\Neovim\\bin\\nvim-qt.exe\""
[HKEY_CLASSES_ROOT\*\shell\nvim\command]
@="wt -p \"Windows PowerShell\" --title Neovim C:\\Program Files\\Neovim\\bin\\nvim.exe \"%1\""
[HKEY_CLASSES_ROOT\directory\shell\nvim]
@="Open with Neovim"
"Icon"="\"C:\\Program Files\\Neovim\\bin\\nvim-qt.exe\""
[HKEY_CLASSES_ROOT\directory\shell\nvim\command]
@="wt -p \"Windows PowerShell\" --title Neovim C:\\Program Files\\Neovim\\bin\\nvim.exe \"%v\""
[HKEY_CLASSES_ROOT\directory\background\shell\nvim]
@="Open Neovim here"
"Icon"="\"C:\\Program Files\\Neovim\\bin\\nvim-qt.exe\""
[HKEY_CLASSES_ROOT\directory\background\shell\nvim\command]
@="wt -p \"Windows PowerShell\" --title Neovim C:\\Program Files\\Neovim\\bin\\nvim.exe \"%v\""
Thanks for tips, worked like a charm for me! Setting the icon in Windows 11 did not work, however... Did anyone face any issues as well?
You can change the icon for the context menu by changing the address from regedit
directly. Find Icon under Default at * and Directory respectively, double click, and point it to any .ico address.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The above worked for me. It took me a bit to realize that Neovim-qt 3.0 has a bug that auto-opens an empty buffer, so you won't see your to-be-edited file until you do a
:bd
Init.vim workaround
The above gist was made from adapting this SO answer to Neovim
https://stackoverflow.com/a/27090678