I think it would be difficult from a different language view. For instance Python uses indents instead of opening/closing brackets. Also you would be changing the layout of the code that might not be meant to be in the format that the "tidy" script template uses. Maybe you should be looking into more "Good Practice" for coding standards in your particular language.<br>
<br><div class="gmail_quote">On Wed, Jan 13, 2010 at 5:02 PM, Kenneth Adam Miller <span dir="ltr"><<a href="mailto:kennethadammiller@gmail.com">kennethadammiller@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Recently, as I was asking for help on IRC I posted my code. Someone said it looked ugly. Of course, there are many coding preferences and one of them is spacing style. I was thinking about writing a simple vim plugin that could reformat source code to make it look according to a sample, and then I thought, since I don't have much experience out there, and there are lots of different languages that might handle this much much better than a cumbersome and lengthy program in C to handle strings, I thought perhaps that I might ask for some opinions and directions on this. C/C++ program or vim plugin? Or what's more, it could be something that I haven't thought of yet.<br>
<br>The program should perform code tidying up and would be well suited to run before a make command.<br><br>I think that it should offer spacing and indenting options as well as some comment formatting options. These should be able to be set by a gui that offers an abstract and quick way to set it. Otherwise, the user would have to learn even <i>more</i> commands and that's the last thing that I want. I want an abstract gui that will be easy to set.<br>
<br>This will offer very regular code formatting. Say you have a lot of nested calls and you don't want to use tabs with space 8 because if you do it will keep on trailing off the screen. Also, frequently there are often commands that we like to use, but they are long. like... cout << "very long text"; and we don't want to redo each of them individually, it would take forever. or say someone else used an editor that it looked good in and now you use yours and it looks like crap. whatever the reason, i want a tool that can be run like a command but will offer a gui to format the code. <br>
<br>After thinking this over, I've come up with a lot of ideas about how this could be managed to provide a set of features/options that I don't want to describe here. <br><br>If you guys know of any other tools that do anything of the sort like what i've described here, I'd like to know what they are so that I don't start another project only to find that someone else has already created something similar. Or if you have any suggestions, send them my way, or perhaps you don't think that this project is worth a shot-whatever it is, speak out about it.<br>
<br>--<br>
Ubuntu-us-tx mailing list<br>
<a href="mailto:Ubuntu-us-tx@lists.ubuntu.com">Ubuntu-us-tx@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-tx" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-tx</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>God Bless<br>