max397574 / better-escape.nvim

Map keys without delay when typing
GNU General Public License v3.0
629 stars 19 forks source link

`autoindent` option doesn't work #54

Closed hieulw closed 3 months ago

hieulw commented 9 months ago

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.

max397574 commented 9 months ago

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 commented 3 months ago

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