[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Indentation
From:       espie () quatramaran ! ens ! fr (Marc Espie)
Date:       2005-03-11 16:21:32
Message-ID: 20050311162132.4F583E118 () quatramaran ! ens ! fr
[Download RAW message or body]

In article <200503051256.00547.garycramblitt@comcast.net> you write:
>Some of the code I inherited has this:
>
>/************************************************ vim:set ts=4 sw=4 sts=4:
>
>Does Kate honor this?  I'm guessing that "ts=4" means tab stops at 4, but I'm 
>not sure what the others are.

Yes, that's tabstop=4. This is a fairly bad idea, take it from an old
timer. Always leave tabstop at its default 8. All tools will work just
fine with that, including cat and more.

Now, visual formatting is another issue. sw=4 sets shift-width to 4 in
vi. That's the setup for the indentation level, for various formatting
commands in vim.  Every vim user who's been around for a while *will*
use sw  to prepare their code, not tabstop.

If you need to mangle/unmangle tabulations and spaces, there's always
expand and unexpand.

But whatever you do, whether you use tabs or spaces or any weird
combination, please,  please, please stay with tabstop at 8. That is,
your file should look just fine if you look at it with stupide less.
Whatever happens internal to your text-editor is another issue entirely.

For instance, people may end up looking at your code using an interface
like cvsweb, and I don't think they will be able to tweak the tabstop
with that. (well, you always end up  being able to fix things
eventually, but it does break the flow of your thoughts, for instance
when you're surfing through various source codes looking for
information).

I only meet two kind of people who mangle tabstops in published source
code: ignorant beginners and rude people. ;-)
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic