Wednesday, April 25, 2012

Re: Indenting/formating

On Wednesday, April 25, 2012 4:58:23 AM UTC-5, Michael Henry wrote:
> On 04/25/2012 03:26 AM, John Beckett wrote:
> > Gautier DI FOLCO wrote:
> >> I known this page but I would go further : the equal sign
> >> must have a space before and after, [...]
> >
> > I don't think Vim is suitable for that.
>
> For a tool outside of Vim, you might like "uncrustify":
> http://uncrustify.sourceforge.net/
>
> It has hundreds of options to match a wide variety of styles,
> and it does a good job of parsing and reformatting source code.
>

If you do find an external tool you like, you can invoke it from within Vim to replace the built-in format and/or indent commands.

See :help 'formatprg' and :help 'equalprg'. I'd suggest 'formatprg' for heavy-duty formatting like adding whitespace within lines or moving text between lines, and 'equalprg' for more lightweight indentation stuff.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment