当前位置: 首页 > news >正文

[sublime text] add sublime text to context menu 右键菜单中“Open with Sublime Text”

 

Google Gemini生成

Adding Sublime Text to your right-click (context) menu makes opening files and folders much faster. The process differs depending on whether you are using Windows or macOS.


For Windows Users

If you didn't check the "Add to explorer context menu" box during the initial installation, you can add it manually via the Registry Editor.

  1. Press Win + R, type regedit, and hit Enter.

  2. Navigate to: HKEY_CLASSES_ROOT\*\shell

  3. Right-click on shell and select New > Key. Name it Open with Sublime Text.

  4. (Optional) To add an icon: Right-click the new key, select New > String Value, name it Icon, and set its value to the path of your sublime_text.exe (usually C:\Program Files\Sublime Text\sublime_text.exe).

  5. Right-click your Open with Sublime Text key and select New > Key. Name this one command.

  6. Double-click the (Default) value inside the command folder and paste the following (including quotes):

    "C:\Program Files\Sublime Text\sublime_text.exe" "%1"


For macOS Users

macOS doesn't use a registry; instead, you can create a "Quick Action" using Automator.

  1. Open Automator from your Applications folder.

  2. Select Quick Action as the document type.

  3. At the top, set "Workflow receives current" to files or folders in Finder.

  4. Search for the Open Finder Items action and drag it to the workflow area on the right.

  5. In the "Open with" dropdown, select Sublime Text.

  6. Go to File > Save and name it "Open in Sublime Text".

Now, when you right-click a file in Finder, you will see "Open in Sublime Text" under the Quick Actions menu.


For Linux Users (Ubuntu/Gnome)

If you use Nautilus, you can add a script to the scripts folder:

  1. Navigate to ~/.local/share/nautilus/scripts.

  2. Create a new file named Open in Sublime.

  3. Paste the following into the file:

    Bash
     
    #!/bin/bash
    subl "$@"
    
  4. Make the file executable: chmod +x "Open in Sublime".


Would you like me to walk you through how to add the "Open Folder as Project" option specifically for Windows?

 

http://www.jsqmd.com/news/259807/

相关文章:

  • 机遇,颓废,醒悟,挫折?奋进!
  • 体验大模型图像处理:云端免配置方案,按需付费不浪费
  • 彼得林奇如何应对市场恐慌
  • 如何在 Odoo 19 中为自定义模块添加章节和备注
  • 基于Bilibili青少年模式使用情况的数据分析系统设计与实现开题报告
  • 广告学考研白热化突围:AI证书成上岸关键加分项
  • 如何在 Odoo 19 中创建日历视图
  • Java毕设项目推荐-基于springboot的旅行指南行程规划、景点推荐系统的设计与实现【附源码+文档,调试定制服务】
  • 【计算机毕业设计案例】基于springboot的旅行指南个性化行程推荐系统的设计与实现(程序+文档+讲解+定制)
  • 科大讯飞秋招笔试真题 - 字符拼接 字典序最小的字符串拼接 圆心覆盖
  • 基于SpringBoot的KPL赛事综合管理系统的设计与实现
  • 新闻学学生留学信息差避坑指南:掌握这些,学习留学两不误
  • 基于python的搜索引擎设计与实现
  • 基于SpringBoot的车辆违章信息管理系统的设计与实现
  • Dnspy附加进程调试第三方App的说明
  • 这3个volatile使用错误,正在毁掉你的多线程程序
  • 基于Hadoop的南昌市房价预测系统的设计与实现开题报告
  • 《把脉行业与技术趋势》-59-《如何快速了解一个行业》哪些人需要如何快速了解一个行业?
  • 12.平铺视图、窗口、消息框部件(lv_tileview,lv_win,lv_msgbox)
  • 【C语言】详解C语言字节打包:运算符优先级、按位或与字节序那些坑
  • 我终于狠下心改变家里的网络架构!原来是我高估了自己
  • 什么是信息学奥数(NOI)?
  • AD域控批量配置域用户下次登录需要修改密码
  • 2026.1.14总结
  • Stable Diffusion Web UI 绘世版 v4.6.1 整合包:一键极速部署,深度解决 AI 绘画环境配置与 CUDA 依赖难题
  • 巴菲特的公司治理观:股东利益至上
  • 电子发票批量提取导出合并助手
  • 提示工程架构师领域:高效提示团队打造的策略探讨
  • UART 协议规范
  • 基于 IPIDEA 的 GitHub 代码文件抓取与数据可视化实践(Python 实现)