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

前端 未结 8 832
离开以前
离开以前 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:12

    If you're not up for spelunking the registry, you can do this from the Windows Explorer (instructions for any editor, not just Emacs):

    1. Open the Windows Explorer and select the Tools\Folder Options... menu item.

    2. Click on the File Types tab and select the extension for the type of file you want to associate with your editor. For this example, I'll use the TXT extension.

    3. Click the Advanced button in the details frame to bring up the Edit File Type dialog.

    4. You can either change the current open action, or specify a new action like Open with MyEditor.

      If you choose to edit, click the Edit... button and in the Application used to peform action textbox, put the full path to your editor, followed by "%1". For example, C:\SciTe\wscite\SciTE.exe "%1".

      If you want to create a new action, click the New... button, give the action a name, and give the full path to your editor, followed by "%1".

    5. If you want to make an action the default for that file type, select the action, then click the Set Default button.

    6. OK out of all dialogs.

    Another option would be to put a shortcut to your editor's executable in your Send To folder, %USERSPROFILE%\SendTo. I usually create a new folder in here called "Editors" and put shortcuts to the various editors I use.

提交回复
热议问题