Sublime Text 3, how to add to right click?

前端 未结 7 1828
别那么骄傲
别那么骄傲 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:12

    The perfect one for Windows

    1. create a sumblime.bat file
    2. put the following text into it

    sublime.bat

    @echo off
    SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
    
    rem add it for all file types
    @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3"         /t REG_EXPAND_SZ /v "" /d "Open with Sublime Text 3"   /f
    @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3"         /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
    @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_EXPAND_SZ /v "" /d "%st3Path% \"%%1\"" /f
     
    rem add it for right click on explorer
    @reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text 3"         /t REG_EXPAND_SZ /v "" /d "Open with Sublime Text 3"   /f
    @reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text 3"         /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%" /f
    @reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text 3\command" /t REG_EXPAND_SZ /v "" /d "%st3Path% \"%%V\"" /f 
    
    rem add it for right click on explorer
    @reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\Open with Sublime Text 3"         /t REG_EXPAND_SZ /v "" /d "Open with Sublime Text 3"   /f
    @reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\Open with Sublime Text 3"         /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%" /f
    @reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\Open with Sublime Text 3\command" /t REG_EXPAND_SZ /v "" /d "%st3Path% \"%%V\"" /f
    pause
    
    1. Run it as Administrator

提交回复
热议问题