确定是否已经在 Sublime Text 中分配了按键序列 [英] Determine if a key sequence has already been assigned in Sublime Text

查看:31
本文介绍了确定是否已经在 Sublime Text 中分配了按键序列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Sublime Text (2|3) 是否有 API 方法或某种方法来确定是否已经分配了快捷键或热键序列?我安装了很多插件和宏,在制作新插件和宏时,很难确定将其分配给哪个键序列,因此我不会与其他东西发生冲突.键绑定可以在 Packages/DefaultPackages/User 和任何插件想要分配它们的 .sublime-keymap 文件中分配.为了让事情变得更复杂,我在三个不同的操作系统上工作,每个平台都有不同的键盘映射.我是否必须自己手动搜索所有键盘映射文件,或者有更好的方法吗?

Does Sublime Text (2|3) have an API method or some way of determining if a shortcut or hot key sequence has already been assigned? I have lots of plugins and macros installed, and when making new ones it can be difficult to determine what key sequence to assign it to so I don't conflict with something else. Key bindings can be assigned in .sublime-keymap files in Packages/Default, Packages/User, and whichever plugin wants to assign them. To make things more complicated, I work on three different OSes, and there are different keymaps for each platform. Do I have to keep manually searching all the keymap files myself, or is there a better way to do it?

推荐答案

您可以尝试安装和使用 FindKeyConflicts.

You might try installing and using FindKeyConflicts.

您也可以打开控制台 ctrl + ` 并输入 sublime.log_commands(True).然后,您可以输入您的快捷键/按键序列,并查看绑定了哪些内容(如果有).

You can also open a console ctrl + ` and enter sublime.log_commands(True). You can then enter your shortcut/key sequence and see what, if anything, is bound to it.

这篇关于确定是否已经在 Sublime Text 中分配了按键序列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆