sublime text 3-right click context menu

时间:2022-10-07 23:24:44

dd a system wide windows explorer button " Edit with Sublime" similar to how Notepad++ does it or some other editors?
See attached screenshot.sublime text 3-right click context menu

(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
http://www.howtogeek.com/107965/how-to-add-any-application-shortcut-to-windows-explorers-context-menu/
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:https://gist.github.com/jcppkkk/8330314

@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.exe
SET entryName=Sublime Text
SET menuText=Open with Sublime Text
SET entryNameAsAdmin=Sublime Text As Admin
SET menuTextAsAdmin=Open with Sublime Text As Admin
SET elevate.CmdPath=%~dp0__elevate.cmd
SET elevate.VbsPath=%~dp0__elevate.vbs echo # Administrative permissions required. Detecting permissions...
call :check_Permissions echo # add it for all file types
reg add "HKEY_CLASSES_ROOT\*\shell\%entryName%" /t REG_SZ /v "" /d "%menuText%" /f
reg add "HKEY_CLASSES_ROOT\*\shell\%entryName%" /t REG_EXPAND_SZ /v "Icon" /d "\"%stPath%\",0" /f
reg add "HKEY_CLASSES_ROOT\*\shell\%entryName%\command" /t REG_SZ /v "" /d "\"%stPath%\" \"%%1\"" /f echo # Download elevate scripts
call :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 admin
reg add "HKEY_CLASSES_ROOT\*\shell\%entryNameAsAdmin%" /t REG_SZ /v "" /d "%menuTextAsAdmin%" /f
reg add "HKEY_CLASSES_ROOT\*\shell\%entryNameAsAdmin%" /t REG_EXPAND_SZ /v "Icon" /d "\"%stPath%\",0" /f
reg add "HKEY_CLASSES_ROOT\*\shell\%entryNameAsAdmin%\command" /t REG_SZ /v "" /d "\"%elevate.CmdPath%\" \"%stPath%\" \"%%1\"" /f echo # add it for folders
reg add "HKEY_CLASSES_ROOT\Folder\shell\%entryName%" /t REG_SZ /v "" /d "%menuText%" /f
reg add "HKEY_CLASSES_ROOT\Folder\shell\%entryName%" /t REG_EXPAND_SZ /v "Icon" /d "\"%stPath%\",0" /f
reg add "HKEY_CLASSES_ROOT\Folder\shell\%entryName%\command" /t REG_SZ /v "" /d "\"%stPath%\" \"%%1\"" /f
pause
goto :EOF :check_Permissions
net session >nul 2>&1
if %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

sublime text 3-right click context menu的更多相关文章

  1. removing right click context menu options on recycle bin

    Humpty is correct as always  First you might want to make a backup of the reg key then remove the Wa ...

  2. php Debugging with Xdebug and Sublime Text 3(转)

    Debugging – we all do it a lot. Writing code perfectly the first time around is hard and only a few ...

  3. sublime Text emmet插件使用手册

    转自:http://www.w3cplus.com/tools/emmet-cheat-sheet.html 介绍 Emmet (前身为 Zen Coding) 是一个能大幅度提高前端开发效率的一个工 ...

  4. 超好用的谷歌浏览器、Sublime Text、Phpstorm、油猴插件合集

    原文:超好用的谷歌浏览器.Sublime Text.Phpstorm.油猴插件合集 - 『精品软件区』 - 吾爱破解 - LCG - LSG |安卓破解|病毒分析|破解软件|www.52pojie.c ...

  5. sublime text 3 + python配置,完整搭建及常用插件安装

    四年的时间,一直使用EmEditor编辑器进行Python开发,之前是做面向过程,只需要将一个单独的py文件维护好即可,用着也挺顺手,但是最近在做面向对象的开发,不同的py文件中相互关联较多,感觉单纯 ...

  6. Sublime Text 全程指引 by Lucida

    作者:Lucida 微博:@peng_gong 豆瓣:@figure9 博客园:@figure9 原文链接:http://zh.lucida.me/blog/sublime-text-complete ...

  7. Sublime Text 3 全程详细图文原创教程(持续更新中。。。)

    一. 前言 使用Sublime Text 也有几个年头了,版本也从2升级到3了,但犹如寒天饮冰水,冷暖尽自知.最初也是不知道从何下手,满世界地查找资料,但能查阅到的资料,苦于它们的零碎.片面,不够系统 ...

  8. CodeAtlas For Sublime Text

    CodeAtlas is a plugin of SublimeText, which allows one to explore the call graph conveniently. The p ...

  9. sublime text 2 快捷键

    快捷键 功能 ctrl+shift+n 打开新Sublime ctrl+shift+w 关闭Sublime,关闭所有打开文件 ctrl+shift+t 重新打开最近关闭文件 ctrl+n 新建文件 c ...

随机推荐

  1. 远程操控软件 TeamViewer for MAC 官方中文版11.0.55321

    百度云:https://pan.baidu.com/s/1o77ol2y 提取密码:3tsx windows: http://download.pchome.net/internet/server/r ...

  2. VC++ WINDOWS自定义消息范围

    WINDOWS自定义消息WM_USER和WM_APP WM_USER常量是Windows帮助应用程序定义私有窗口类里的私有消息,通常使用WM_USER+一个整数值,但总值不能超过0x7FFF(十进制: ...

  3. Linq之Linq to Sql

    目录 写在前面 系列文章 Linq to sql 总结 写在前面 上篇文章介绍了linq to xml的相关内容,linq to xml提供一种更便捷的创建xml树,及查询的途径.这篇文章将继续介绍l ...

  4. 基于Asp.Net Core Mvc和EntityFramework Core 的实战入门教程系列-1

    来个目录吧: 第一章 第二章 第三章 暂时就这么多.后面路线更新吧 本系列文章为翻译加上我个人的使用心得理解,希望帮助热爱学习的程序员. 珍重声明:本系列文章会跟原文有点出入,去掉了罗里吧嗦的文字. ...

  5. Android 开发者,如何提升自己的职场竞争力?

    前言 该文章是笔者参加 Android 巴士线下交流会成都站 的手写讲稿虚拟场景,所以大家将就看一下. 开始 大家好,我是刘世麟,首先感谢安卓巴士为我们创造了这次奇妙的相遇.现场的氛围也让我十分激动. ...

  6. 使用Docker安装Jenkins

    Jenkins Jenkins是一个开源软件项目,是基于Java开发的一种持续集成工具,用于监控持续重复的工作,旨在提供一个开放易用的软件平台,使软件的持续集成变成可能. 环境准备 腾讯云 硬件配置: ...

  7. 023_nginx跨域问题

    什么是跨域? 使用js获取数据时,涉及到的两个url只要协议.域名.端口有任何一个不同,都被当作是不同的域,相互访问就会有跨域问题.例如客户端的域名是www.redis.com.cn,而请求的域名是w ...

  8. 关于java编译

    1.不包括jar编译 javac -cp %CLASSPATH% -d ./classes/ ./src/org/csource/common/*.java --先编译基础模块,并且指定class保存 ...

  9. [转]为什么匿名内部类参数必须为final类型

    1)  从程序设计语言的理论上:局部内部类(即:定义在方法中的内部类),由于本身就是在方法内部(可出现在形式参数定义处或者方法体处),因而访问方法中的局部变量(形式参数或局部变量)是天经地义的.是很自 ...

  10. LG5055 【模板】可持久化文艺平衡树

    题意 您需要写一种数据结构,来维护一个序列,其中需要提供以下操作(对于各个以往的历史版本): 在第 pp 个数后插入数 xx . 删除第 pp 个数. 翻转区间 [l,r][l,r],例如原序列是 { ...