我可以查看并单独禁用扩展程序的键盘快捷键,例如 Sublime Text Keymap 扩展程序吗? [英] Can I see, and individually disable, keyboard shortcuts for extensions, such as the Sublime Text Keymap extension?
问题描述
当我开始使用 VS Code 时,我安装了Sublime Text Keymap and Settings Importer"扩展,使其更像 Sublime,因为这是我所熟悉的.
When I started using VS Code, I installed the "Sublime Text Keymap and Settings Importer" extension, to make it act more like Sublime, because that is what I was familiar with.
现在,我想使用默认的快捷方式.我想逐渐切换,可能是一次禁用一些 Sublime 快捷方式,或者至少知道哪些快捷方式来自 Sublime 扩展,这样我就可以训练自己停止使用它们.
Now, I would like to use the default shortcuts. I want to switch gradually, maybe by disabling a few Sublime shortcuts at a time, or by at least knowing which shortcuts are coming from the Sublime extension, so I can train myself to stop using them.
有没有什么简单的方法可以查看哪些快捷方式来自 Sublime 扩展程序,并且最好禁用其中的一些(但不是全部)?
如果我查看键盘快捷键"列表,它会显示混合在一起的默认快捷键和 Sublime 快捷键,据我所知,没有提示哪个是哪个.例子:
If I look at the "Keyboard Shortcuts" list, it shows the default shortcuts and the Sublime shortcuts mixed together, with no hint as to which is which, as far as I can tell. Example:
它显示 Command+P 和 Command+T 作为 workbench.action.quickOpen
的快捷方式,两者的来源都是默认".但我知道 Command+T 来自扩展,因为如果我禁用扩展,我看不到它(但我仍然看到 Command+P).禁用扩展并重新启动 VS Code 有点不方便,所以我想要一种简单的方法来查看扩展中的快捷方式.
It shows both Command+P and Command+T as shortcuts for workbench.action.quickOpen
, both with a source of "Default". But I know that Command+T is coming from the extension, because if I disable the extension, I don't see it (but I still see Command+P). Disabling the extension and restarting VS Code is kind of inconvenient, so I would like an easy way to see which shortcuts are coming from the extension.
推荐答案
关注这个 PR https://github.com/microsoft/vscode/pull/95713(在 GUI 中显示键绑定源).看起来它可能包含在 vscode v1.45 中.它允许您按用户定义或扩展名过滤键盘快捷键".从上面的链接:
Keep an eye on this PR https://github.com/microsoft/vscode/pull/95713 (Show keybinding source in GUI). Looks like it may be included in vscode v1.45. It would allow you to filter the "Keyboard Shortcuts" by user-defined or extension. From the above link:
过滤器示例:
@user
- 显示用户定义的键绑定
@user
- shows user defined keybindings
@default
- 显示默认键绑定
@extensions
- 显示所有扩展贡献的键绑定
@extensions
- shows all extension contributed keybindings
@extensions:"${EXTENSION_NAME}"
- 显示由${EXTENSION_NAME}
@extensions:"${EXTENSION_NAME}"
- shows keybindings contributed by
${EXTENSION_NAME}
@extensions:${EXTENSION_NAME}
- 与上面相同,只是没有引号(空格无效)
@extensions:${EXTENSION_NAME}
- same as above only without quotes
(spaces are invalid for this one)
使用过滤器和文本搜索也有效:
Searching with filter and text also works:
@extensions:bookmarks list
- 显示来自书签的键绑定包含单词list"的扩展
@extensions:bookmarks list
- shows keybindings from bookmarks
extension that contain the word "list"
<小时>
然后有了这样一个过滤列表,可以很容易地禁用您想要的任何命令.
And then with such a filtered list it would be easy to disable whichever commands you wished.
这篇关于我可以查看并单独禁用扩展程序的键盘快捷键,例如 Sublime Text Keymap 扩展程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!