Change the "keys" value from ["super+delete"]
to ["super+backspace"]
.
Trouble mapping Cmd-Delete key in Sublime Text 2
-
04-07-2023 - |
سؤال
I'm trying to map Cmd-Delete (on my Mac) to delete the current line in Sublime Text 2. I added the following line in my ST2 key bindings file:
{ "keys": ["super+delete"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
It doesn't work, i.e. Cmd-Delete retains the default "delete to beginning of line" binding. All my other key bindings, both those listed before and after the above line in the bindings file, work.
What am I doing wrong?
المحلول
نصائح أخرى
It should work if you put your custom bindings at the end of the list of key bindings (don’t forget to fix the trailing comma!). Otherwise any later bindings which set "super+delete" will overwrite (i.e. reset to default) super+delete.
لا تنتمي إلى StackOverflow