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?
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?
"remain 8 spaces wide but display as 2 spaces" doesn't make any sense to me. Tabs don't inherently have any spacing information (8 or otherwise), it's completely up to interpretation of each program working with the data.
For 2-space tabs and no use of spaces:
se noet ts=2 sts=2 sw=2
For 8-space tabs, 2-space indents, and minimal use of spaces:
se noet ts=8 sts=2 sw=2
You want:
tabstop=2
shiftwidth=2
noexpandtab
That will put 0x9 tab chars in the file and treat them as 2 spaces when displaying.