如何取消Sublime Text 2中的键绑定? [英] How to unbind a key binding in Sublime Text 2?
问题描述
我习惯按 CTRL + T 在ST2中打开一个新标签页.但是,这会调用转置功能.我可以将new_file
命令映射到 CTRL + T ,但是可以通过用户键盘映射文件完全禁用该命令.我的搜索建议将其添加到用户键盘映射.
I have a habit of hitting CTRL+T to open a new tab in ST2. However this invokes the transpose function. I could map the new_file
command to CTRL+T, but is it possible to disable the command completely via user keymap file. My search suggested adding this to user keymap.
[ { "keys": ["ctrl+t"], "command": "unbound" } ]
未绑定"是禁用快捷方式的官方认可方法吗?
Is the "unbound" an officially endorsed way of disabling a shortcut?
推荐答案
{ "keys": ["ctrl+-"], "command": "noop" }
将键绑定到无操作或任何不带有命令行为的东西(例如"hello")都应该起作用.
Binding a key to a no-operation or anything which wouldn't carry a command behavior, such as "hello", should work.
如果将来改变主意,这还将保留绑定的主体.
This would also keep the body of the binding if you change your mind in the future.
这篇关于如何取消Sublime Text 2中的键绑定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!