Sublimetext3 升华文字3,如何添加到右键点击?
我如何添加崇高的文本,就像如何用记事本编辑一样,这没什么大不了的,但可以节省时间Sublimetext3 升华文字3,如何添加到右键点击?,sublimetext3,Sublimetext3,我如何添加崇高的文本,就像如何用记事本编辑一样,这没什么大不了的,但可以节省时间 安装升华文本时,您可以单击标有“添加到浏览器上下文菜单”的复选框 如果这不起作用;下面是一个深入介绍如何实现此目的的线程:只需创建一个reg文件subl.reg,然后用文本编辑器打开它并添加内容: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\Edit with Sublime Text] @="Edit with &Sub
安装升华文本时,您可以单击标有“添加到浏览器上下文菜单”的复选框
如果这不起作用;下面是一个深入介绍如何实现此目的的线程:只需创建一个reg文件
subl.reg
,然后用文本编辑器打开它并添加内容:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Edit with Sublime Text]
@="Edit with &Sublime Text"
"Icon"="C:\\Program Files\\Sublime Text 3\\sublime_text.exe,0"
"MuiVerb"="Edit with Sublime Text"
[HKEY_CLASSES_ROOT\*\shell\Edit with Sublime Text\command]
@="C:\\Program Files\\Sublime Text 3\\sublime_text.exe \"%1\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\Sublime]
@="Open with Sublime Text"
"Icon"="C:\\Program Files\\Sublime Text 3\\sublime_text.exe,0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\Sublime\command]
@="\"C:\\Program Files\\Sublime Text 3\\sublime_text.exe\" \"%V\""
[HKEY_CLASSES_ROOT\Directory\shell\Sublime]
@="Open with Sublime Text"
"Icon"="C:\\Program Files\\Sublime Text 3\\sublime_text.exe,0"
[HKEY_CLASSES_ROOT\Directory\shell\Sublime\command]
@="\"C:\\Program Files\\Sublime Text 3\\sublime_text.exe\" \"%1\""
您可能需要根据Sublime Text安装调整路径。这将在右键单击文件、右键单击文件夹背景以及右键单击文件夹时添加升华文本。
只需双击该文件即可将条目添加到注册表中
通过按window+r
,然后在该面板中写入regedit
,您始终可以编辑和删除这些条目。在那里,您将看到相同的路径结构,例如右键单击命令的HKEY\u CLASSES\u ROOT\*\shell
@echo关闭
设置st3Path=C:\Program Files\subgrame Text 3\subgrame\u Text.exe
rem为所有文件类型添加它
@reg添加“HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3”/t reg_SZ/v”“/d”Open with Sublime Text 3”/f
@reg添加“HKEY\U CLASSES\U ROOT\*\shell\Open with Sublime Text 3”/t reg\U EXPAND\U SZ/v”图标/d“%st3Path%,0”/f
@reg添加“HKEY\U CLASSES\U ROOT\*\shell\Open with SUMBLE Text 3\command”/t reg\U SZ/v”“/d”%st3Path%\“%%1\”/f
rem为文件夹添加它
@reg添加“HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3”/t reg_SZ/v”“/d”Open with Sublime Text 3”/f
@reg添加“HKEY_CLASSES\u ROOT\Folder\shell\Open with Sublime Text 3”/t reg_EXPAND_SZ/v”图标/d“%st3Path%,0”/f
@reg添加“HKEY\U CLASSES\U ROOT\Folder\shell\Open with SUMBLE Text 3\command”/t reg\U SZ/v”“/d”%st3Path%\“%%1\”/f
暂停
rem在资源管理器上单击鼠标右键添加它
@reg添加“HKEY_CLASSES\u ROOT\Directory\Background\shell\Sublime”/t reg_SZ/v”“/d”以升华文本3打开/f
@注册添加“HKEY_CLASSES\u ROOT\Directory\Background\shell\Sublime”/t注册_SZ/v”图标/d“%st3Path%”/f
@reg添加“HKEY\U CLASSES\U ROOT\Directory\Background\shell\Sublime\command”/t reg\U SZ/v”“/d”%st3Path%\“%%v\”/f
暂停
2018年5月更新:不再可用,软件包已被删除
如果你有巧克力,你可以跑:
choco install sublimetext3-contextmenu
感谢r-stein给出上述答案。但是
[HKEY\U CLASSES\U ROOT\Directory\shell\Sublime\command]
有一些问题。最后一个参数应该是\%V\\
,而不是\%1\\
完整的subl.reg
为
Windows Registry Editor Version 5.00
; show in context menu when right click all kinds files
[HKEY_CLASSES_ROOT\*\shell\Sublime]
@="Open with Sublime Text 3"
"Icon"="C:\\Program Files\\Sublime Text 3\\sublime_text.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Sublime\command]
@="\"C:\\Program Files\\Sublime Text 3\\sublime_text.exe\" \"%1\""
; show in context menu when right click empty area of explorer
[HKEY_CLASSES_ROOT\Directory\Background\shell\Sublime]
@="Open with Sublime Text 3"
"Icon"="C:\\Program Files\\Sublime Text 3\\sublime_text.exe,0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\Sublime\command]
@="\"C:\\Program Files\\Sublime Text 3\\sublime_text.exe\" \"%V\""
; show in context menu when right click directory
[HKEY_CLASSES_ROOT\Directory\shell\Sublime]
@="Open with Sublime Text 3"
"Icon"="C:\\Program Files\\Sublime Text 3\\sublime_text.exe,0"
[HKEY_CLASSES_ROOT\Directory\shell\Sublime\command]
@="\"C:\\Program Files\\Sublime Text 3\\sublime_text.exe\" \"%V\""
在升华文本文件夹中创建升华上下文菜单.bat文件,并放入以下内容
@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
以管理员身份运行。Windows的完美选择
sumblime.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
只需重新启动安装程序 单击此按钮: 然后选中此选项: 让它结束,现在您将拥有:
我喜欢运行批处理脚本,所以我可以修改它,并添加了一些其他选项。它非常适合meRight click浏览器的空白区域,不会以这种方式显示上下文菜单。您还需要添加
[HKEY\U CLASSES\U ROOT\Directory\Background\shell\Sublime]
。有一种更简单的方法:您可以在上下文菜单中添加一个图标:Beautiful。对于那些不知道如何处理.reg文件的人,只需在编辑完成后打开它。令人惊讶的是,对于那些在使用管理员权限打开.reg文件时遇到困难的人,只需保存文件,以管理员身份打开regedit,然后转到文件>导入019,这对我很有用。没有一个答案提到包裹。。??我使用了注册表修改答案。我尝试了,但它给出了以下错误,SublimiteText3 contextmenu未安装。找不到列出源的包。源:“”注意:指定显式源时,它将覆盖默认源。如果软件包版本是预发布版本,并且您没有指定--pre
,则可能找不到该软件包。请参阅以获得更多帮助。