vi style(9) indent

George Georgalis george at galis.org
Fri Mar 25 13:54:27 PST 2005


On Fri, Mar 25, 2005 at 09:16:32PM +0000, Jonathon McKitrick wrote:
>
>Does anyone know how to get vi to indent a wrapped parenthetical expression
>to the same as the line above?  e.g.:
>
>void foo(int bar,
>	 int *result)
>
>I decided to go back to vim, but I'd like to get this feature working.

does emacs do that? "autoindent" will help on the next line and it may
be hackable to support sensing the first, but I don't think it does it
out of the box.

. ..or one of these may work for you...
http://vimdoc.sourceforge.net/htmldoc/options.html#'cindent'
http://vimdoc.sourceforge.net/htmldoc/options.html#'smartindent'
http://vimdoc.sourceforge.net/htmldoc/options.html#'indentexpr'

I'd prefer an intellegent wrap, I've long wanted ":set lbr wrap" to wrap
according to the left margin of each line. That way sgml like documents
can use long single lines for a given tag, which are nicely put away
"unset wrap" for document formatting, and a visual document structure
is preserverved while editing wraped lines. -- don't think that can
be done out of the box, maybe someone wrote a macro...

// George


-- 
George Georgalis, systems architect, administrator Linux BSD IXOYE
http://galis.org/george/ cell:646-331-2027 mailto:george at xxxxxxxxx





More information about the Users mailing list