Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

One of the indispensable thing we can do with .perltidyrc and VIM is that we can hightlight one block in VIM (visually) and do "! perltidy" to cleanup just a block within a file.

Can we do the same thing also in C/C++ environment as well under VIM as IDE? Please advice?

2006-09-15 Retitled by Arunbear, as per Monastery guidelines
Original title: 'Perltidy,VIM for C/C++ visual block cleanup'

  • Comment on (OT) Perltidy,VIM for C/C++ visual block cleanup

Replies are listed 'Best First'.
Re: (OT) Perltidy,VIM for C/C++ visual block cleanup
by derby (Abbot) on Sep 11, 2006 at 14:46 UTC

    Sure you can ... you just have to find the appropriate beautifier. I cannot recommend any but try google.

    -derby

    update: Or google for OSS code beautifiers.

    another update: And I'd give uncrustify a try based on name alone!

      Thanks. But what I mean is beautifying within VIM editor - especially visualize block, "uncrustify" doesn't seem to work on VIM.

        Sure it does ... !uncrustify -c config_file works for me. I didn't really like having to pass the config file option all the time so I modified the source to use a default. But ... it works. What problems are you having?

        -derby