Subject: Re: newbie hand holding requested please
From: rpw3@rpw3.org (Rob Warnock)
Date: Mon, 29 Dec 2008 19:46:58 -0600
Newsgroups: comp.lang.lisp
Message-ID: <sZ6dnVAC-OkP4MTUnZ2dnUVZ_vzinZ2d@speakeasy.net>
Mike  <mikee@mikee.ath.cx> wrote:
+---------------
| Rob Warnock <rpw3@rpw3.org> 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..."]


-Rob

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., <http://www.ccs.neu.edu/home/dorai/scmindent/scmindent.html>
[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			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607