

Sublime Text 2 右键菜单中的实用选项
source link: https://lucifr.com/useful-entries-in-sublime-text-2-context-menu/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Sublime Text 2 右键菜单中的实用选项
Sublime Text 2 现在已经成了 Lucifr 最常用的编辑工具了,频繁的更新不停给人带来惊喜,今天无意中发现在右键菜单(Context menu)中有几个很实用的功能。
右键菜单中的实用功能
-
Show Unsaved Changes...
: 显示当前文件未保存的更改,而且是以 diff 的形式在输出中显示的,一目了然。 -
Reveal in Finder
: 顾名思义,方便在文件系统中定位。 -
Copy File Path
:复制文件的路径,很实用的功能,比如要到终端中对当前文件进行某些操作的情况。 -
Reveal in Side Bar
:在侧边栏的目录树中定位当前文件,同样是非常实用的功能,便于了解当前文件在项目中的位置和整体结构的关系。
侧边栏右键功能加强
推荐通过 Package Control 安装 SideBarEnhancements 这个插件,可以大大加强在侧栏目录树中右键的选项:
-
基础的一些如:新建文件/目录,编辑,打开/运行,显示,在选择中/上级目录/项目中查找,剪切,复制,粘贴,重命名,删除,刷新……
-
很实用的
Open With
,可以通过Edit Applications
来定义程序及对应的后缀类型。可参见我的设置:
[
{"id": "side-bar-files-open-with",
"children":
[
// Marked
{
"caption": "Marked",
"id": "side-bar-files-open-with-marked",
"command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "Marked.app",
"extensions":"markdown|md|mdown|mkd|mkdn|txt" //any file with these extensions
}
},
{"caption":"-"},
//Photoshop
{
"caption": "Photoshop",
"id": "side-bar-files-open-with-photoshop",
"command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "Adobe Photoshop CS5.app",
"extensions":"psd|png|jpg|jpeg" //any file with these extensions
}
},
// Preview
{
"caption": "Preview",
"id": "side-bar-files-open-with-preview",
"command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "Preview.app",
"extensions":"psd|png|jpg|jpeg|gif" //any file with these extensions
}
},
//separator
{"caption":"-"},
//Browsers
{
"caption": "Chrome",
"id": "side-bar-files-open-with-chrome",
"command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "Google Chrome.app",
"extensions":"html|php" //any file with extension
}
},
{
"caption": "Firefox",
"id": "side-bar-files-open-with-firefox",
"command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "Firefox.app",
"extensions":"html|php" //any file with these extensions
}
},
{"caption":"-"},
// Textmate
{
"caption": "Textmate",
"id": "side-bar-files-open-with-textmate",
"command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "Textmate 2.app",
"extensions":".*" //any file with these extensions
}
}
]
}
]
- 很牛的
Copy as Text...
:包含各种形式的路径、URI(甚至包括 base64 的 data:uri)、转码后的文件名、各种 HTML Tag(a、img、script、style)……
欢迎关注 Sublime Text 这个标签,Lucifr 会继续分享更多相关的技巧和信息。
Recommend
-
32
在 Finder 的右键菜单中添加「Open in VSCode」 发表于 2020 年 04 月 22 日...
-
25
用 macOS 系统的苹果电脑用户都知道,macOS 某些地方确实没 Windows 方便,比如右键菜单,没有复制粘贴之类的菜单,...
-
61
删除“Open in Windows Terminal”右键菜单 最近发现右键菜单中多了一个"Open in Windows Terminal"选项,如下图所示...
-
21
WPF 列表右键菜单比较符合 MVVM 的命令绑定方法群里小伙伴问我如何在 ListView 的右击的时候知道右击的是哪一项,他想要获取对应的行信息。他使用的是 GridView 做的,于是我告诉他需要自己写 ItemContainerStyle 在 GridViewRowPresenter 里添加右键的逻...
-
7
IT之家2 月 4 日消息 当用户想在 Microsoft Edge 中执行一个特定的操作时,在上下文(右键)菜单上有太多的项目会很烦人。而且在用户的上下文菜单上至少有一两个选项是用户从来没有使用过的,特别是当用户在浏览器中阅读 PDF 文档时。 在 Canary...
-
8
WebView2简单试用(八)—— 右键菜单 默认菜单: WebView2本身携带了类似Edge的右键菜单,但有的时候我们需要对...
-
7
给 Mac 添加右键菜单「使用 VSCode 打开」 — 码志最终的实现效果是在文件 / 文件夹上右击时,会出现菜单项「用 VSCode 打开」,点击后会启动 Visual Studio Code 打开对应的文件 / 文件夹。打开「自动操作.app」,就是小机器人图标那个;
-
5
Win10无法右键弹出菜单 问题分析:注册表多余子项导致。可能是我之前下载了一些软件,比如:idea、git、webstorm、goland...
-
5
V2EX › Windows win10 可以给右键菜单里面的项目添加快捷键吗 dragonQueen · 3 小时 31...
-
12
win11 那个右键菜单显示更多选项 做个悬浮自动显示他不香么 V2EX › Windows win11 那个右键菜单显示更多选项 做个悬浮自动显...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK