How to create a right-click context shell shortcut “edit with Emacs”?

前端 未结 8 826
离开以前
离开以前 2021-01-30 11:22

Notepad++ automatically adds a shell shortcut so that when you\'re in Windows Explorer, you can right-click on a file and select \"edit with Notepad++\". How can I do the same w

8条回答
  •  臣服心动
    2021-01-30 12:17

    Just like polyglot's answer, but no need to start a server or any of that mess.

    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\*\shell]
    [HKEY_CLASSES_ROOT\*\shell\openwemacs]
    @="&Edit with Emacs"
    [HKEY_CLASSES_ROOT\*\shell\openwemacs\command]
    @="C:\\Program Files (x86)\\Emacs\\bin\\emacsclientw.exe --alternate-editor=\"C:\\Program Files (x86)\\Emacs\\bin\\runemacs.exe\" -n \"%1\""
    [HKEY_CLASSES_ROOT\Directory\shell\openwemacs]
    @="Edit &with Emacs"
    [HKEY_CLASSES_ROOT\Directory\shell\openwemacs\command]
    @="C:\\Program Files (x86)\\Emacs\\bin\\emacsclientw.exe --alternate-editor=\"C:\\Program Files (x86)\\Emacs\\bin\\runemacs.exe\" -n \"%1\""
    

提交回复
热议问题