Sublime Forum

Vintage Insert mode vs. Not using Vintage

#1

I want to gradually start using Vim keybinding in Sublime, but to be honest, at least for several months, I don’t want to use them really often. Only occasionally.

Is it okay then to just keep Vintage enabled and spend 99% of the time in Insert mode, using regular, non-Vim keybindings? I mean, instead of turning Vintage on and off instead?

Does the first approach have any drawbacks? Will all my regular Sublime keybindings work there?

0 Likes

#2

I did not have any experience with Vim before activating Vintage, so I transitioned slowly. The only annoying thing for me was that every time you press Esc, Vintage would change from insert to command mode. To avoid this, I edited Vintage.sublime-keymap and commented out the code below.

{ "keys": ["escape"], "command": "exit_insert_mode",
	"context":
	[
		{ "key": "setting.command_mode", "operand": false },
		{ "key": "setting.is_widget", "operand": false }
	]
},

I use Ctrl + o to enter and exit insert mode. Below are my key bindings, but you may use any key binding you want.

{ "keys": ["ctrl+o"], "command": "enter_insert_mode", "args": { "insert_command": "move", "insert_args": {"by": "characters", "forward": true} }, "context": [ {"key": "setting.command_mode"}, {"key": "selection_empty"} ] },
{ "keys": ["ctrl+o"], "command": "enter_insert_mode", "context": [ {"key": "setting.command_mode"}, {"key": "selection_empty", "operator": "equal", "operand": false, "match_all": false } ] },
{ "keys": ["ctrl+o"], "command": "exit_insert_mode", "context": [ { "key": "setting.command_mode", "operand": false } ] },

Yes, regular keybindings would work when Vintage is activated, provided you do not put "vintage_ctrl_keys": true in your settings.

1 Like