[Courses] Style (was Lesson Three: Basic Declarations & Expressions)

Malcolm-Rannirl rannirl-lc at otherkin.net
Mon Oct 14 11:04:22 EST 2002


On Saturday 12 October 2002 07:39 pm, Jenn Vesperman wrote:

> > /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4
> > -*- */ Emacs will pick this up and use it in its C code formatter, so any
> > new code you type in c-mode or c++-mode automatically gets indented to
> > the right level.  Is there a way to get vim to read these modelines?

> I don't know about those modelines, but vim does use an equivalent. I
> can't think what it is offhand, unfortunately.

I think you want:
 set shiftwidth=4	(or set sw=4)
 set tabstop=8	(set ts=8)

(but I don't use emacs, so I'm not entirely sure what those modelines do).

from http://vimdoc.sourceforge.net/cgi-bin/vimfaq2html3.pl (which has already 
taught me a couple of things, amazing what RTFM will do for you :)).


-- 
Beauty carved in flesh
Desire set in stone.
Evolution calling...
Afraid to be alone.
- 'Sand' Spider Lilies



More information about the Courses mailing list