Customize autoindent settings in VIMRC file

Posted by Shane Reustle on Super User See other posts from Super User or by Shane Reustle
Published on 2011-02-26T18:42:29Z Indexed on 2012/10/06 15:41 UTC
Read the original article Hit count: 341

Filed under:
|
|

I have autoindent enabled in my .vimrc file but have run into an annoying bug/feature. For example, when I'm tabbed in 3 times, and I hit return, the new line is also tabbed in 3 times. Then when I hit enter again, that new line is also indented 3 times, as it should. The problem occurs when I go back up to the previous line (the first of the 2 new lines). VIM automatically removes the whitespace because it saw it as an empty line.

Is there a way to disable this from happening? I'd like to be able to back to coding like this:

function test(){ <return> <return> } <up> <right>

Thanks!

© Super User or respective owner

Related posts about ubuntu

Related posts about vimrc