1. Win + R, 输入 regedit
  2. 展开到路径: HKEY_CLASSES_ROOT\directory\shell\SublimeText3
    输入名字 Open with Sublime Text 3

  3. 展开到如下路径: HKEY_CLASSES_ROOT\directory\shell\SublimeText3\command
    输入命令 C:\Program Files\Sublime Text 3\sublime_text.exe -a "%1" (添加 -a 用于在当前窗口打开文件夹而非新起窗口)

也可以把如下内容保存到本地的 *.reg 文件中双击运行:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\SublimeText3]
@="Open with Sublime Text 3"

[HKEY_CLASSES_ROOT\Directory\shell\SublimeText3\command]
@="C:\\Program Files\\Sublime Text 3\\sublime_text.exe -a \"%1\""

使用 Sublime 打开文件的设置:

  1. Win + R, 输入 regedit
  2. 展开到路径: HKEY_CLASSES_ROOT\*\shell

   新建 Key: Open with Sublime Text

  1. 展开到路径: HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text

   新建 Key: command

  1. 展开到路径: HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text\command

   新建 String value: C:\Program Files\Sublime Text 3\sublime_text.exe "%1"

也可以把如下内容保存到本地的 *.reg 文件中双击运行:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text\command]
@="C:\\Program Files\\Sublime Text 3\\sublime_text.exe \"%1\""
Comments
Write a Comment