better-escape.nvim icon indicating copy to clipboard operation
better-escape.nvim copied to clipboard

`autoindent` option doesn't work

Open hieulw opened this issue 1 year ago • 1 comments

This behavior is described in vimdoc

'autoindent' 'ai'	boolean	(default on)
			local to buffer
	Copy indent from current line when starting a new line (typing <CR>
	in Insert mode or when using the "o" or "O" command).  If you do not
	type anything on the new line except <BS> or CTRL-D and then type
	<Esc>, CTRL-O or <CR>, the indent is deleted again.

When I press <Esc> the indent is automatically deleted. But when I press kj (my mapping to <Esc>) the indent is still there.

hieulw avatar Jan 14 '24 13:01 hieulw

I din't think I can do anything about that since when using kj you do type something on the new line I'll have to check later if I can do a hack to still make this work somehow Will take me some time because I'm really busy over the next few months

max397574 avatar Jan 16 '24 08:01 max397574

can't really do anything about this you could use sth like the example from the readme which replaces the "clear_empty_lines" setting https://github.com/max397574/better-escape.nvim?tab=readme-ov-file#rewrite

max397574 avatar Jul 05 '24 04:07 max397574