Formatting, tabs vs spaces.

Rodolfo Lima rodolfo@rodsoft.org
Wed Jul 16 13:09:00 GMT 2008


Chris Fairles escreveu:

> Sorry, I mean, it will insert as many tab chars as required (i.e.
> floor(indent / 8)) and pad with mod 8 spaces.

Well, if you're talking about expandtab, vim's manual says:

"In Insert mode: Use the appropriate number of spaces to insert a
<Tab>.  Spaces are used in indents with the '>' and '<' commands and
when 'autoindent' is on.  To insert a real tab when 'expandtab' is
on, use CTRL-V<Tab>."

Also the smarttab option help says:
"When 'expandtab' is not set, the number of spaces is minimized by using 
<Tab>s.", which is the algorithm you're describing.

What you're talking about is when the tabstop value is different from 
the softtabstop and expandtab is off.

Regards,
rod



More information about the Libstdc++ mailing list