clemos / haxe-sublime-bundle

Sublime Text bundle for Haxe programming language
Apache License 2.0
235 stars 86 forks source link

Keybindings Override Defaults #150

Closed simonbw closed 10 years ago

simonbw commented 10 years ago

The ctrl+enter keybinding for building the current target overrides the default Add Line behavior. The behavior also seems to be the same as the default build behavior ctrl+b. The ideal solution to this would be to allow custom keybindings.

clemos commented 10 years ago

You can add custom key bindings in your personnal user key bindinds file, they will override both default bindings and plugin bindings : http://www.sublimetext.com/docs/3/settings.html Ctrl+B shouldn't be overriden by the plugin, though. It's Ctrl+Shift+B that is used.

In this case, you may want to re-map Ctrl+Enter to default actions, and use some different binding for the plugin's command.

The command and key mapping of the plugin are here, if you want to use them as a base : https://github.com/clemos/haxe-sublime-bundle/blob/master/Support/Default.sublime-keymap

I won't change the default keymap, as lots of people are used to it... Best

AndrewBelt commented 6 years ago

For completion, I solved this by pasting

    { "keys": ["ctrl+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line.sublime-macro"} },
    { "keys": ["ctrl+shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line Before.sublime-macro"} },

into the User Keybinding file.