سؤال

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?

هل كانت مفيدة؟

المحلول

Change the "keys" value from ["super+delete"] to ["super+backspace"].

نصائح أخرى

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top