When I’m editing a commit message, I can finish and accept the new message with Cmd+Return (super+enter
in Sublime key bindings parlance). escape
cancels the edit. I want a way to BEGIN editing the commit message with a keystroke.
The default SM key bindings file has these bindings:
{ "keys": ["ctrl+enter"], "command": "commit", "args": { "mode": "commit" },
"context": [{ "key": "setting.commit_message" }, { "key": "can_commit" }]
},
{ "keys": ["ctrl+enter"], "command": "edit_commit",
"context": [{ "key": "setting.commit_message" }, { "key": "read_only" }]
},
{ "keys": ["ctrl+enter"], "command": "save_commit_message",
"context": [{ "key": "setting.commit_message" }, { "key": "is_editing_commit" }]
},
{ "keys": ["escape"], "command": "cancel_edit_commit_message",
"context": [{ "key": "setting.commit_message" }, { "key": "is_editing_commit" }]
I can see escape
, which works as expected, but I don’t understand why ctrl+enter
doesn’t work to save the commit message, but super+enter
does. This does work to begin editing:
{ // Edit commit message
"keys": ["super+enter"],
"command": "edit_commit",
"args": { "commit": "$commit" }
},
Is this correct? Why do the other versions of this in the default file not include the commit?