vi style(9) indent

Devon H. O'Dell dodell at offmyserver.com
Sat Mar 26 01:27:59 PST 2005


On Fri, Mar 25, 2005 at 04:53:25PM -0500, George Georgalis wrote:
> 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

Another project for a hacker with free time: a style(9)
compliant indent(1).

--Devon
Attachment:
pgp00016.pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00016.pgp
Type: application/octet-stream
Size: 187 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20050326/815c03d8/attachment-0021.obj>


More information about the Users mailing list