When the cursor is placed at the end of a line containing nothing but withspace characters, vim will, when i press enter, remove that whitespace. I find this irritating, as it breaks my script for selecting code that are indented to the same level. How can I prevent vim from doing this?
In my .vimrc (http://bjuhn.com/randomstuff/vimrc) I have the following:
filetype plugin on
set copyindent
that is, I am not using any syntax-aware auto-indention, as I have yet to find one that does everything to my liking.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…