* Dave Brown <dagbrown / LART.ca> [Aug, 09 2003 14:01]:
> : yeah.  this is what works for any setting, and allows you to still use
> : tabs.  the question is, how do you make your editor work this way.  Vim
> : can't do this (yet).
>
> Yes it does; it's done it for ages.
>
> Put
>     set softtabstop=2
>     set tabstop=8
>     set noexpandtab
>
> in your .vimrc and you'll get what you're asking for.
>
OMG...read the manual, try it out.  see what happens?  after you indent
to another tabstop (pressing tab 4 times in succession), you get a tab.
man...and the real issue isn't this, but the way autoindenting works, as
it is mostly responsible for such alignment.  what one wants is for each
additional level of indent, add a tab, and for any continuation indent,
use spaces.  So, the algorithm would more or less be:
	1.  Calculate amount of indent for current line.
	2.  Get level of indent of containing block.
	3.  Subtract the containing blocks indent from the current line's
	and use tabs for it.  Indent with spaces for the remaining
	indent.

	nikolai


--
::: name: Nikolai Weibull    :: aliases: pcp / lone-star       :::
::: born: Chicago, IL USA    :: loc atm: Gothenburg, Sweden    :::
::: page: www.pcppopper.org  :: fun atm: gf,lps,ruby,php,war3  :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}