Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JySzE/2c6ca421b9190bbaba7ab403fd7e98e1 to your computer and use it in GitHub Desktop.
Save JySzE/2c6ca421b9190bbaba7ab403fd7e98e1 to your computer and use it in GitHub Desktop.

For Windows 10, change these keys in regedit:

  • Computer\HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\edit\command
  • Computer\HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\open\command
  • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\edit\command
  • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\shell\edit\command

From: %SystemRoot%\system32\NOTEPAD.EXE %1 To: "%ProgramFiles%\Sublime Text 3\sublime_text.exe" "%1" Or: "%ProgramFiles%{insert-path-to-fave-editor}" "%1"

Keywords:

  • right, click, file, context, menu, windows, explorer
  • change, modify, edit
  • get rid of notepad.exe as default editor
  • ini, bat, cmd

Because you can't change default programs easily for above text types.

Now when we right-click on a bat/ini/cmd file in windows explorer, the popup context menu "Edit" command will open that file in sublime or {insert-fave-editor-here}.

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