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! Cheers! Nico _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk signature.asc (204 bytes) Download Attachment |
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 _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
Le jeudi 20 novembre 2008 à 12:45 +0100, Paolo Bonzini a écrit :
> 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. Yes, I just did it. > > 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. Does anyone know how to do it with vim too? Nico _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk signature.asc (204 bytes) Download Attachment |
In reply to this post by Paolo Bonzini-2
>> 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. > > Does anyone know how to do it with vim too? set softtabstop=4 Would you like to write it in the Wiki somewhere? (How to force the tabwidth and softtabstop for *.st files in vim). Thanks, Paolo _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
Le jeudi 20 novembre 2008 à 13:40 +0100, Paolo Bonzini a écrit :
> >> 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. > > > > Does anyone know how to do it with vim too? > > set softtabstop=4 > > Would you like to write it in the Wiki somewhere? (How to force the > tabwidth and softtabstop for *.st files in vim). > Cheers! Nico _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk signature.asc (204 bytes) Download Attachment |
Free forum by Nabble | Edit this page |