Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kenny-kvibe/4d8157250a1ce032a8fb282f02b1fa04 to your computer and use it in GitHub Desktop.
Save kenny-kvibe/4d8157250a1ce032a8fb282f02b1fa04 to your computer and use it in GitHub Desktop.
Change the "Edit" context item (in Explorer right-click menu) to open the selected file using Sublime Text.
Windows Registry Editor Version 5.00
#################################################################
; Change the "Edit" context item (in Explorer right-click menu)
; to open the selected file using Sublime Text,
; optional comments for '*.txt' files and the ST icon.
#################################################################
#=== HKCR\batfile
[HKEY_CLASSES_ROOT\batfile\shell\edit\command]
@="\"C:\\Program Files\\Sublime Text\\sublime_text.exe\" \"%1\""
#### OPTIONAL: uncomment for the ST icon
;[HKEY_CLASSES_ROOT\batfile\shell\edit]
;"Icon"="\"C:\\Program Files\\Sublime Text\\sublime_text.exe\",0"
#================================================================
#=== HKCR\cmdfile
[HKEY_CLASSES_ROOT\cmdfile\shell\edit\command]
@="\"C:\\Program Files\\Sublime Text\\sublime_text.exe\" \"%1\""
#### OPTIONAL: uncomment for the ST icon
;[HKEY_CLASSES_ROOT\cmdfile\shell\edit]
;"Icon"="\"C:\\Program Files\\Sublime Text\\sublime_text.exe\",0"
#================================================================
#=== HKCR\regfile
[HKEY_CLASSES_ROOT\regfile\shell\edit\command]
@="\"C:\\Program Files\\Sublime Text\\sublime_text.exe\" \"%1\""
#### OPTIONAL: uncomment for the ST icon
;[HKEY_CLASSES_ROOT\regfile\shell\edit]
;"Icon"="\"C:\\Program Files\\Sublime Text\\sublime_text.exe\",0"
#================================================================
#=== HKCR\txtfile
#### OPTIONAL: uncomment for the '*.txt' files
;[HKEY_CLASSES_ROOT\txtfile\shell\edit\command]
;@="\"C:\\Program Files\\Sublime Text\\sublime_text.exe\" \"%1\""
;;@="\"%SystemRoot%\\system32\\NOTEPAD.EXE\" \"%1\""
#### OPTIONAL: uncomment for the ST icon
;[HKEY_CLASSES_ROOT\txtfile\shell\edit]
;"Icon"="\"C:\\Program Files\\Sublime Text\\sublime_text.exe\",0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment