Charles E Campbell Jr wrote:
Gundala Viswanath wrote:
Thanks Yakov,
gg=G
:help =
But it seems to me that works on Global basis strictly.
How can we localize the cleanup within a visual block?
Moreoever how can we customize the indentation, bracing, etc?
Since with Perl this customization is captured within .perltidyrc.
To select a region using visual block:
V (move) =
Second -- an external tool that does C beautification is called cb.
Used to be on all Unix boxes, but I see that its apparently not on Linux.
I have my own C beautifier (ccb -- for Chip's C Beautifier) available
at my website: see
http://mysite.verizon.net/astronaut/src/index.html
No guarantees, warranties, etc, and its "use at your own risk". Use
ccb "?"
to get help. Also, you'll need to compile it...
Regards,
Chip Campbell
My Linux box indeed hasn't got "cb", but it has got "indent" which is
meant to beautify and reformat C code, e.g. by adding and removing
spaces, tabs, linefeeds and blank lines, according to various parameters
on a command-line and/or in a config file; GNU indent supports
"original", "K&R" and "GNU" styles in addition to custom style. See
"info indent" (where installed) for details.
Best regards,
Tony.