Sublime Forum

Vintage mode key bindings

#1

In vi command mode I got used to the behavior of the enter key moving the cursor down one line and then going to the beginning of the line.
having some trouble with the syntax to add multiple commands to a key binding.
Below are the two commands taken from the vintage enter binding and the home binding
{ “keys”: “enter”],
“command”: “set_motion”,
“args”: {
“motion”: “move”,
“motion_args”: {“by”: “lines”, “forward”: true, “extend”: true }
},
“context”: {“key”: “setting.command_mode”}],


Home key command follows, what’s the syntax to add this 2nd motion?

    "command": "set_motion", 
    "args": {  
        "motion": "vi_move_to_first_non_white_space_character", 
        "motion_args": {"extend": true } 
    },
    "context": {"key": "setting.command_mode"}]
}

I tried following the json rules but the editor won’t accept it.

0 Likes

#2

No replies to original post, i’ll try rewording the question.

In a key binding, what is the syntax to bind two commands to a key?

0 Likes