Subject: Re: newbie hand holding requested please
From: (Rob Warnock)
Date: Mon, 29 Dec 2008 19:46:58 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
Mike  <> wrote:
| Rob Warnock <> wrote:
| > Here are a few small tips on using Vi (or Vim) when editing Lisp:
| > - Set the following options:
| >     :se ai icl sm mat=2 sw=1
| My normal $HOME/.exrc is:
| set sm ai lisp
| set report=2 ts=4 sw=4

The "ts=4 sw=4", while fine for C, tends to mess things up with
Lisp, IME.  Lots of forms in Lisp want indenting by 1 or 2, not 4.
As a result, I've found that "sw=1" works a lot better, *especially*
when combined with ">%" or "<%" and zero or more following ".",
as needed. [Of course, if your "lisp" mode works well for you,
then "Never mind..."]


p.s. There are also some external re-indenting programs out there
that you might want to try, that you can pipe a section of code through,
e.g., <>
[though you would probably want to tweak that a bit for CL]. One can
reformat some sexp with "!%scmindent" [or any other motion command
besides "%", for larger sections].

Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607