Home Download Buy Blog Forum Support

vintage mode key bindings

vintage mode key bindings

Postby bfrank on Mon Dec 12, 2011 5:36 pm

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.
bfrank
 
Posts: 2
Joined: Mon Dec 12, 2011 5:30 pm

Re: vintage mode key bindings

Postby bfrank on Mon Dec 19, 2011 3:27 pm

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?
bfrank
 
Posts: 2
Joined: Mon Dec 12, 2011 5:30 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 16 guests