Sublime Text 3, how to add to right click?

前端 未结 7 1800
别那么骄傲
别那么骄傲 2020-12-13 07:01

How do I add Sublime Text just like how Edit with Notepad++ is there it\'s nothing big but it saves time.

相关标签:
7条回答
  • 2020-12-13 07:18

    Create sublime_contextmenu.bat file in sublime_text folder and put the following contents.

    @echo off
    
    SET APP_PATH=%~dp0sublime_text.exe
    echo %APP_PATH%
    
    echo Add it for all file types
    reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3"         /ve /d "Open with Sublime Text 3"   /f
    reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3"         /v "Icon" /d "\"%APP_PATH%\"" /f
    reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /ve /d "\"%APP_PATH%\" \"%%1\"" /f
    
    echo Add it for folders
    reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3"         /ve /d "Open with Sublime Text 3"   /f
    reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3"         /v "Icon" /d "\"%APP_PATH%\"" /f
    reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3\command" /ve /d "\"%APP_PATH%\" \"%%1\"" /f
    pause
    

    Run as administrator.

    0 讨论(0)
提交回复
热议问题