Sublime Forum

Vintage Mode (Build 2111)

#1

I’m using the keybinding for exiting insert mode:

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

This works great except that if you are in insert mode and you don’t edit anything on a saved file, the first ‘j’ that you type triggers the changed buffer bit and the tab is marked as having a changed file. Of course, the second ‘j’ triggers the exit insert mode function and the first ‘j’ is removed from the buffer and the net change is 0. Is there a way to revert the modified buffer bit back to unmodified in these situations? I have looked a bit in the docs but I see no obvious way to do it.

Cheers,
Antonio

0 Likes

#2

To be clear, if I try to close the file, ST does not warn about a changed file with a prompt to save the file before closing it so that’s good. I mean that in the file name tab, visually, the file is marked as changed.

0 Likes

#3

The ‘revert’ command will discard unsaved changes to the buffer. :,:,e with Vintage on will get you to that command. I don’t know off the top of my head whether you can easily run a sequence of commands from a key binding to save you the :,:,e steps.

0 Likes

#4

Thanks Guillermo. I will give it a try.

Antonio

0 Likes

#5

My complaint when using vintage mode is it doesn’t remember your column.
For instance, if I’m on column 55 and i hit ‘j’ a bunch to move down, and one of the lines i move to is blank, now the column it is on is 1 from then on. It should store a virtual column and only reset it when i hit ‘h’ and ‘l’.

0 Likes

Vintage mode, retain column position
#6

Agreed. It’s pretty annoying, but with multiple selections it won’t be easy to fix, I think.

0 Likes