I've got a problem where in insert mode, if I type something like {
that will cause indentation, then press enter twice, then match that bracket (such that there is a line in between the opening and closing bracket), all indentation on the line inbetween will be gone.
If that didn't make any sense, here is a video demonstrating the behavior.
This is what I have in my vimrc:
filetype indent on
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
How can I have the indentation stay, preferably without using an "autoclose plugin"?
iintmain() {<CR>}<ctrl-o>O
, this will get you the result you want. – klaus Oct 13 '19 at 3:42