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?
Users can customize their key bindings by creating a file named Default. sublime-keymap in their Packages/User/ directory. For example, the following will create a key binding to show unsaved changes, if any exist, via Ctrl+Shift+`.
The only way to change default key bindings is to edit the settings. json file. To change default key bindings, open the Settings page and select Actions from the sidebar.
Key maps of the corresponding platform will be loaded in the Sublime Text editor. A user can open the keymap file or default key bindings using the option Preferences → Key Bindings.
{ "keys": ["ctrl+-"], "command": "noop" }
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With