PLEASE READ: Whitespace rules

Kevin Ballard eridius at
Fri Sep 7 16:19:02 PDT 2007

On Sep 7, 2007, at 7:09 PM, markd at wrote:

>> # -*- Mode: Tcl; tab-width: 4; indent-tabs-mode: nil; c-basic- 
>> offset: 4
>> -*- vim:et:sw=4:ts=4:sts=4
> I have not had time to follow the thread, and I've found out that  
> "soft
> tabs" are tabs emulated with spaces.  But though some are obvious, can
> someone explain what all the elements of the modeline do?  Are any  
> current
> ports using it?  This needs to be documented.

I constructed the modeline myself, so nothing's using it yet (except  

There's 2 parts. The first is the -*- stuff -*-, which is for emacs.  
The second starts with vim:

1st part:

Mode: Tcl
sets the emacs mode to Tcl

tab-width: 4
sets the tab width to 4

indent-tabs-mode: nil
use soft tabs (yeah, the name is weird)

c-basic-offset: 4
I don't know if this is necessary, but it declares the auto indent  
width as 4.

2nd part:

just the prefix that tells vim to use the rest of the line

Expand tabs, or use soft tabs

shift width = 4, used with the auto indentation mechanism

tabstop is 4

soft tab stop is 4

Kevin Ballard
eridius at

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the macports-dev mailing list