0%

将Sublime Text3添加到右键菜单中

引子

前一段重新安装了Sublime Text3,不过一直不在右键菜单中,所以决定添加,有如下2种方法。

方法

方法一(推荐)

把以下代码,复制到SublimeText3的安装目录,然后重命名为:sublime_addright.inf,然后右击安装就可以了。

PS:重命名文件之前,需要先在工具—文件夹选项,查看中,把隐藏已知文件类型的扩展名前边的复选框不勾选。

1
2
3
4
5
6
7
8
9
10
11
12
[Version]
Signature="$Windows NT$"

[DefaultInstall]
AddReg=SublimeText3

[SublimeText3]
hkcr,"*\\shell\\SublimeText3",,,"Edit With SublimeText3"
hkcr,"*\\shell\\SublimeText3\\command",,,"""%1%\sublime_text.exe"" ""%%1"" %%*"
hkcr,"Directory\shell\SublimeText3",,,"Edit With SublimeText3"
hkcr,"*\\shell\\SublimeText3","Icon",0x20000,"%1%\sublime_text.exe, 0"
hkcr,"Directory\shell\SublimeText3\command",,,"""%1%\sublime_text.exe"" ""%%1"""

方法二

把以下代码,复制到SublimeText3的安装目录,然后重命名为:sublime_addright.reg,然后双击就可以了。

PS:需要把里边的Sublime的安装目录,替换成实际的Sublime安装目录。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\SublimeText3]
@="Edit With SublimeText3"
"Icon"="D:\\Program Files\\Sublime Text 3\\sublime_text.exe,0"

[HKEY_CLASSES_ROOT\*\shell\SublimeText3\command]
@="D:\\Program Files\\Sublime Text 3\\sublime_text.exe %1"


[HKEY_CLASSES_ROOT\Directory\shell\SublimeText3]
@="Edit With SublimeText3"
"Icon"="D:\\Program Files\\Sublime Text 3\\sublime_text.exe,0"

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

最后,附一个删除右键菜单的脚本吧。

把以下代码,复制到SublimeText3的安装目录,然后重命名为:sublime_delright.reg,然后双击就可以了。

1
2
3
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\*\shell\SublimeText3]
[-HKEY_CLASSES_ROOT\Directory\shell\SublimeText3]

更新提示

去除更新检查

点击菜单栏“Preferences”=> “Settings-User” 进入个人参数设置页面;

1
2
3
4
5
6
7
8
9
10
11
// Settings in here override those in "Default/Preferences.sublime-settings",
// and are overridden in turn by syntax-specific settings.
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"font_size": 14,
"update_check": false,//更新检查去除
"word_wrap":"auto", //自动换行
"default_encoding": "UTF-8", //默认utf8编码
"tab_size": 4, //tab 是4个空格
"translate_tabs_to_spaces": true,//tab自动转成空格
}

欢迎关注我的其它发布渠道