博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
联系 订阅 管理 sublime text 3-right click context menu
阅读量:5789 次
发布时间:2019-06-18

本文共 3954 字,大约阅读时间需要 13 分钟。

dd a system wide windows explorer button " Edit with Sublime" similar to how Notepad++ does it or some other editors?

See attached screenshot.fd6ebd92a3d2c81fc9ff2967d1b58978.jpg

(I know this is an old thread, but since I dropped by looking for the same information and found it elsewhere, so here goes.)

If you've installed Sublime from the zip, follow the instructions from
Scroll down to 'chapter' by the name 'All file types'.
Taking the above page's guide as an example, you can add a shortcut key to the context menu item by adding the text you like to 'Open with Nodepad' -key's (Default) string.
Here's my setup as exported from regedit:

Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2] @="Open with S&ublime Text 2" [HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2\command] @="c:\\apps\\tools\\sublime_text.exe \"%1\""

 

batch fie from this site:

 

@echo off@rem ==================@rem Source:  @rem     https://gist.github.com/jcppkkk/8330314@rem Description: @rem     Install context menu to allow user opens file with Sublime Text as User or Admin, or Open Folder with Sublime Text.@rem Usage:@rem     Download this .bat file to in Sublime Text's installation folder.@rem     Execute this batch file. It will download elevate codes and setup context menu.@rem ==================@rem \"%stPath%\"   : Path to Sublime Text installation dir.@rem %entryName%: Key name for the registry entry.@rem %menuText% : Context menu text. Set your preferred menu text (e.g.: translate to your language).@rem %entryNameAsAdmin%: Key name for the registry entry.@rem %menuTextAsAdmin% : Context menu text. Set your preferred menu text for administrator privilege (e.g.: translate to your language). SET stPath=%~dp0sublime_text.exeSET entryName=Sublime TextSET menuText=Open with Sublime TextSET entryNameAsAdmin=Sublime Text As AdminSET menuTextAsAdmin=Open with Sublime Text As AdminSET elevate.CmdPath=%~dp0__elevate.cmdSET elevate.VbsPath=%~dp0__elevate.vbs echo # Administrative permissions required. Detecting permissions...call :check_Permissions echo # add it for all file typesreg add "HKEY_CLASSES_ROOT\*\shell\%entryName%"         /t REG_SZ /v "" /d "%menuText%"   /freg add "HKEY_CLASSES_ROOT\*\shell\%entryName%"         /t REG_EXPAND_SZ /v "Icon" /d "\"%stPath%\",0" /freg add "HKEY_CLASSES_ROOT\*\shell\%entryName%\command" /t REG_SZ /v "" /d "\"%stPath%\" \"%%1\"" /f echo # Download elevate scriptscall :download "https://gist.github.com/jcppkkk/8330314/raw/3d863b0d5de7b47cb177f0571ffa232d27a3869e/__elevate.cmd" "%elevate.CmdPath%"call :download "https://gist.github.com/jcppkkk/8330314/raw/2b89b316d6af469db513a02d156c9a315d684fd0/__elevate.vbs" "%elevate.VbsPath%" echo # add it for all file types as adminreg add "HKEY_CLASSES_ROOT\*\shell\%entryNameAsAdmin%"         /t REG_SZ /v "" /d "%menuTextAsAdmin%"   /freg add "HKEY_CLASSES_ROOT\*\shell\%entryNameAsAdmin%"         /t REG_EXPAND_SZ /v "Icon" /d "\"%stPath%\",0" /freg add "HKEY_CLASSES_ROOT\*\shell\%entryNameAsAdmin%\command" /t REG_SZ /v "" /d "\"%elevate.CmdPath%\" \"%stPath%\" \"%%1\"" /f echo # add it for foldersreg add "HKEY_CLASSES_ROOT\Folder\shell\%entryName%"         /t REG_SZ /v "" /d "%menuText%" /freg add "HKEY_CLASSES_ROOT\Folder\shell\%entryName%"         /t REG_EXPAND_SZ /v "Icon" /d "\"%stPath%\",0" /freg add "HKEY_CLASSES_ROOT\Folder\shell\%entryName%\command" /t REG_SZ /v "" /d "\"%stPath%\" \"%%1\"" /fpausegoto :EOF  :check_Permissionsnet session >nul 2>&1if %errorLevel% == 0 (    echo Administrative permissions confirmed.    goto :EOF) else (    echo Failure: Current permissions inadequate.    echo You will need to "Run as Administrator" if using Vista/Win7/Win8.    pause >nul    exit)goto :EOF  :download @"C:\Windows\System32\WindowsPowerShell\v1.0\powershell" "$wc = New-Object System.Net.WebClient;$wc.DownloadFile('%1', '%2')"@echo %2@goto :EOF

本文转自hcy's workbench博客园博客,原文链接:http://www.cnblogs.com/alterhu/p/3986781.html,如需转载请自行联系原作者。

你可能感兴趣的文章
没有设计模式画小人,有趣画板
查看>>
Silverlight 浏览器外运行及更新判断
查看>>
(转)NS2无线网络遗失模型
查看>>
虚拟化架构中小型机构通用虚拟化架构
查看>>
cocoa touch 组件
查看>>
Oracle体系结构及备份(十)——sga-others_pool
查看>>
Bootstrap Popover 隐藏的Javasript方法
查看>>
memcache使用方法测试
查看>>
POJ 3347 Kadj Squares
查看>>
JSP技术模型(五)JSP隐含变量
查看>>
console.log的一个应用 -----用new方法生成一个img对象和document.createElement方法创建一个img对象的区别...
查看>>
JQuery上传插件Uploadify API详解
查看>>
如何同步你的云存储。同步你的移动硬盘和笔记本
查看>>
C# 线程更新UI
查看>>
[转]mysql 存储过程中使用多游标
查看>>
Java HashMap源码分析
查看>>
Java同步容器和并发容器
查看>>
Thinkphp+AJAX动态验证用户输入是否合法
查看>>
UE4在VS2013中各个编译配置代表意义
查看>>
多线程(5)async&await
查看>>