Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim: undo newline in insert mode?

Tags:

I often accidentally press return while typing in insert mode. To undo the accidental return, I typically press backspace several times. First to remove all the automatic indentation, and then, finally, to remove the newline.

Is there a better way. Something along the lines of undoing the effect of the last keystroke?

like image 904
Andreas Järliden Avatar asked Feb 12 '13 08:02

Andreas Järliden


1 Answers

In the exact same situation, I do <C-w><C-w>. <C-w> is a great asset to have in insert mode.

like image 168
romainl Avatar answered Oct 19 '22 04:10

romainl