Fernando D. Mato Mira <matomira@iname.com> wrote:
+---------------
| Espen Vestre wrote:
| > I disagree. Editing code without the dangling parens is just as easy
| > (provided you use a sensible editor, of course).
|
| If you don't have an editor that does automatic indentation but that
| highlights matching parentheses, it's easier to stack. You don't
| have to manually move all dangling parentheses when you wrap
| existing code in a control structure: [example omitted]
+---------------
Note that even Vi can do this, since it *can* "expr-indent" -- well,
actually "S-expr shift", but that's been "good enough" in my experience.
Simply ":set sw=1", put the cursor on the opening paren of the S-expr
you need to shift, and type ">%" (or "<%" if moveing left), and then
additional "."s as needed to line it all up. The entire S-expr, no matter
how many lines long, will move as one unit. [And yes, any bunched r-parens
at the end will move, too, which is usually what you want.]
-Rob
-----
Rob Warnock, 41L-955 rpw3@sgi.com
Applied Networking http://reality.sgi.com/rpw3/
Silicon Graphics, Inc. Phone: 650-933-1673
1600 Amphitheatre Pkwy. PP-ASEL-IA
Mountain View, CA 94043