To make --use-tabs work, you need to add these options, too: --tab-size2 --indent-level2
In short: indent -ut -ts2 -i2 Joe R. Nassimian wrote: > > Ok, just worked out part of the problem, which as it turns out is not a > problem when I searched the mailing lists. > > I found part of my answer here: > http://lists.gnu.org/archive/html/bug-indent/2007-05/msg00015.html > > 1) state the version of indent you are using. > GNU indent 2.2.10 > > 2) State on which platform you are running. > On Ubuntu 10.10, uname returns: 2.6.35-22-generic #35-Ubuntu SMP Sat > Oct 16 20:45:36 UTC 2010 x86_64 GNU/Linux > > > 3) Exactly which command options you used. > --use-tabs \ > --tab-size 4 \ > --indent-level 4 \ > --start-left-side-of-comments \ > --leave-preprocessor-space > > I still get spaces in front of some if keywords instead of tabs. > > Thanks again for your help, > > Joe R. Nassimian > > P.S. I use to think tabs are bad for indenting, but turns out I was wrong. > Imagine you are working in a team with each developer having a > different preference. > I prefer tabs to be sized to 4 spaces, others in the team I work prefer 2 > or 8. > Using tabs allows me to adjust the spacing size in my editor, without > imposing it on others. > On top of that, you use one character instead of 4 or 2 when you use tabs. > > > > On Fri, Nov 12, 2010 at 11:35 AM, Joe R. Nassimian < > [email protected]> wrote: > >> I am trying to format a program's source code with GNU Indent, and I >> would >> like to have it indented using the GNU style, except for the spaces. >> >> I am using --use-tabs (which according to the documentation is on by >> default) but indentation is still done using 2 spaces. >> >> How can I tell indent to use tabs instead of spaces for indentation? >> >> Thanks in advance for your help, >> >> Joe R. Nassimian >> > _______________________________________________ > bug-indent mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/bug-indent > > -- View this message in context: http://old.nabble.com/Using-tabs-instead-of-spaces-tp30199810p35267992.html Sent from the Gnu - Indent Tool mailing list archive at Nabble.com. _______________________________________________ bug-indent mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-indent
