Question

I recently read this article related to indenting source files in Vim . However , I would like to be able to custom indent some of them . Is there a way to specify which binary runs when I press = ?

Was it helpful?

Solution

From the help:

={motion}       Filter {motion} lines through the external program
                given with the 'equalprg' option.  When the 'equalprg'
                option is empty (this is the default), use the
                internal formatting function |C-indenting|.  But when
                'indentexpr' is not empty, it will be used instead
                |indent-expression|.

It looks like setting the equalprg option is what you want.

OTHER TIPS

You can set the equalprg-option. (see :he = for more).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow