help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] About indentation in files


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] About indentation in files
Date: Thu, 20 Nov 2008 12:45:11 +0100
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

nico wrote:
> Hi,
> 
> I'm just wondering why in almost all files in gst methods are not
> indented with a tab but with 4 spaces, while the body of the method is
> indented with a tab.
> 
> I was surprised at first because my vim displays all tabs as 4 spaces
> instead of 8, so didn't see any indentation!

The GNU coding standards, again, mandate that tabs be always 8 spaces.
That's the default on most machines, so it's the right thing to do.  I'm
sure you can configure vim to have 8-space tabs for *.st files.

On the other hand, 8 spaces indentation just looks too wide to me for
Smalltalk (I'm slowly getting used to it in C).  So, I'm using 4 spaces
as in C code, but doing that with combinations of tabs and spaces.
Emacs can automatically tabify lines, and the Smalltalk mode for Emacs
produces the right indentation.

The gst-convert tool also produces file with this convention, which is
why almost all files are indented this way (most files date to before
the introduction of the special syntax, and were originally written in
bang-separated format; some files have not been converted yet, mostly to
ensure better code coverage in the tests).

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]