What should I do in my ~ / .vimrc file? (Question related to the tab)

advertisements

I would like tabs in my source code to remain tabs (8 spaces wide), NOT to be converted to spaces, but displayed as 2 spaces.

I recall vim being able to accomplish this.

Could anyone help me a little?


You want:

tabstop=2
shiftwidth=2
noexpandtab

That will put 0x9 tab chars in the file and treat them as 2 spaces when displaying.