On Saturday 17 January 2009, Santiago M. Mola wrote: > revno: 1249 > committer: Ville Skyttä <[email protected]> > branch nick: current > timestamp: Wed 2009-01-14 22:17:14 +0200 > message: > Add/compact *Emacs, vi and friends indentation etc settings. > > +# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- > +# ex: ts=8 sw=8 et filetype=sh > > 4 spaces for each tab seems more extended in bash scripts than 8 spaces
Not at all to me (assuming I understood correctly what you meant by extended). Having the default indent step equal to 4 spaces (or half a tab) and replacing all occurrences of 8 consecutive spaces with a tab is very common though, perhaps you meant that? Defining tab width (which is not the same thing as indent step) as something else than 8 causes very different results in editors/viewers that support the definition and ones that don't; I don't think that's a good idea. Tab == 8 spaces is a pretty much ubiquitous default everywhere. The intent of this patch was not to make any indentation changes but to be explicit what the current indent settings are, based on how I read the current sources. FWIW, changing the default indent step to 4 would be something I'd personally prefer, I believe it would be specified as # -*- mode: shell-script; sh-basic-offset: 4; indent-tabs-mode: t -*- # ex: ts=8 sw=4 sts=4 noet filetype=sh ...or for completeness, add "tab-width: 8" to the first line (but that would make it > 80 chars :(). (BTW my original change has a bug in the ex: line; "et" should have been "noet" in that too just like in the above, will fix that - thanks for making me take another look at it.) _______________________________________________ Bash-completion-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/bash-completion-devel
