Saturday 22 September 2018

Disable a Sublime key-binding entirely?


I want to get rid of these completely:


{ "keys": ["ctrl+up"], "command": "scroll_lines", "args": {"amount": 1.0 } },
{ "keys": ["ctrl+down"], "command": "scroll_lines", "args": {"amount": -1.0 } },
{ "keys": ["ctrl+shift+up"], "command": "swap_line_up" },
{ "keys": ["ctrl+shift+down"], "command": "swap_line_down" },

Just have those keys do nothing.


So I copied them into my default user bindings and then... what?



Answer



Owen_R's solution does not work in Sublime 3; instead of false, just put a command that does not exist:


{ "keys": ["ctrl+up"],          "command": "pass" },
{ "keys": ["ctrl+down"], "command": "pass" },
{ "keys": ["ctrl+shift+up"], "command": "pass" },
{ "keys": ["ctrl+shift+down"], "command": "pass" },

I know this post is old and you asked specifically for ST2, but since this post still appears in the first results on most search engines, I think it will help people to find ST3's solution here too.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...