Sometimes in insert mode I hit <CR> by mistake  and I have to hit the backspace multiple times (depends on the indentation) to get back where I was.e.g. <div>  <p> This is some text []</p></div>The cursor is [] and I hit <CR> :<div>  <p> This is some text   []</p></div>Now I have to hit backspace twice to get back to the previous line (this case isn't so bad but it doesn't have a lot of indentation).Do you know a better way to do ?
Undo  in insert mode
insert mode
How about:inoremap <C-\> <C-o>:left 0<Cr><BS><C-o> will execute a normal mode command (:left 0), which will remove all indent, this will also put your cursor at the start of the line. <BS> will get you back to the last line.This is a bit like a backwards J.Unfortunately, mapping Shift+Enter or Ctrl+Enter doesn't seem possible, so I choose <C-\>, as being near the enter.