简体   繁体   English

Sublime Text 3 侧边栏上下文菜单

[英]Sublime Text 3 Sidebar Context Menu

I wanted to know if there is a mac key binding that would work to show context menu while on the sidebar.我想知道是否有一个 mac 键绑定可以在侧边栏上显示上下文菜单。 I don't want to have to right click all the time to get the context menu and would prefer to have the key binding.我不想一直右键单击以获取上下文菜单,而是希望拥有键绑定。

Add a key mapping .添加键映射 Sublime Text > Preferences > Key Bindings-User . Sublime Text > Preferences > Key Bindings-User For example you could use Ctrl+h (not assigned), syntax is below.例如,您可以使用 Ctrl+h(未分配),语法如下。

[

    { "keys": ["ctrl+h"], "command": "context_menu" }

]

Add a keybinding by:通过以下方式添加键绑定:

Ctrl + Shift + P (or Cmd+Shift+P on OSX), then type: Preferences: Key Bindings , Ctrl + Shift + P (或Cmd+Shift+P在 OSX 上),然后输入: Preferences: Key Bindings

Then assign Ctrl + ' (as an example, you can use any key binding) using the following syntax:然后使用以下语法分配Ctrl + ' (例如,您可以使用任何键绑定):

[
    { "keys": ["ctrl+'"], "command": "context_menu" }   
]

This is more of a MAC related question, than sublime text related.这更像是一个与 MAC 相关的问题,而不是与 sublime text 相关的问题。 As I don't own a MAC myself, I can only give you some advice:由于我自己没有MAC,我只能给你一些建议:

Question is, what are you trying to achieve with right clicking?问题是,您想通过右键单击实现什么目标? There are loads of useful keyboard shortcuts, which basically do the same thing and either exist by default, or can be easily set in the key bindings file manually (if you don't know how, have a look here ).有很多有用的键盘快捷键,它们基本上做同样的事情,或者默认存在,或者可以轻松地手动在键绑定文件中设置(如果你不知道如何,请看这里)。

For quick file switching and navigation, I highly recommend you getting used to "Goto Anything" (Command+P).为了快速切换文件和导航,我强烈建议您习惯“转到任何东西”(Command+P)。 Getting yourself used to this is the hardest part, but once you got used to, you don't want to turn back.让自己习惯这是最难的部分,但是一旦习惯了,您就不想回头。

For file and folder creation there are useful plugins which work on command line basis and by far more efficient than clicking, scrolling, searching... just saying.对于文件和文件夹创建,有一些有用的插件可以在命令行的基础上工作,并且比单击、滚动、搜索要高效得多……只是说。

I also highly recommend these excellent sublime text tutorials by jeffrey way.我还强烈推荐 jeffrey way 编写的这些优秀的 sublime text 教程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM