[m-dev.] indenting (was Re: [m-rev.] diff: fix bugs with existential types & secondary tags)

David Overton dmo at cs.mu.OZ.AU
Tue May 1 13:54:20 AEST 2001


On Tue, May 01, 2001 at 01:12:56PM +1000, Zoltan Somogyi wrote:
> On 30-Apr-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > What's the advantage in keeping the file tab-free?
> 
> If you keep the file tab-free, someone else (e.g. me) can edit the file by
> setting ts=4, working away normally (which will insert 4-space tabs), and
> then restore the file to its original tab-free state with "detab -4".
> 
> If you have 8-space tabs in the file, this doesn't work. By the time one finds
> that the file has some 8-space tabs, one has also inserted some 4-space tabs,
> and sorting out which tab stands for how many spaces must be done manually.

I find it's generally easier to keep ts=8 for all files.  If I want to
do 4-space indentation, I set sw=4 and use Ctrl-T and Ctrl-D to do the
indenting.   Vi/Vim inserts the appropriate number of tabs/spaces for
each indent level.  The advantage of this is that everyone can keep
ts=8 (the default) for all files they edit and not worry about using
detab or Vim's expandtab setting.

Of course, either of these conventions only works if everyone sticks
to them, so we should work out what we're going to do and add it to
the coding standard.


David
-- 
David Overton      Department of Computer Science & Software Engineering
PhD Student        The University of Melbourne, Victoria 3010, Australia
+61 3 8344 9159    http://www.cs.mu.oz.au/~dmo
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list