Skip to content

Instantly share code, notes, and snippets.

@JAffleck
Created June 17, 2018 05:42
Show Gist options
  • Save JAffleck/2ba6ca0bd0d5545fd17c396357b9abf0 to your computer and use it in GitHub Desktop.
Save JAffleck/2ba6ca0bd0d5545fd17c396357b9abf0 to your computer and use it in GitHub Desktop.
Neovim - Edit With Neovim WIndows Context menu
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\""
@vonguyenminhtu2504
Copy link

vonguyenminhtu2504 commented Oct 26, 2023

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\""

@dnery
Copy link

dnery commented Dec 4, 2023

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?

@Tzjinn
Copy link

Tzjinn commented Jul 4, 2024

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