This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Code beautifier/formatter in Keil uVision 4

Is there a code beautifier/formatter included with Keil uVision 4?

The only options I could find was the Advanced Menu, I'm looking for something with more functionality (provide template with set of rules which is used to auto correct the code files.

If not can anyone provide suggestion for mostly C based project built on an OS for ARM based processor.

Parents Reply Children
  • Code beautifier
    I love the expression, but even with 'beautifully' aligned braces, sloppy code will still look sloppy.

    Erik

  • Notepad++ is an open source programming editor with lots of features and plug-ins. It was recommended on this forum some time ago. I down loaded and I use it almost exclusively at the present time. I also have one of the last versions of Coderight but I now use Notepad++.

    Notepad++ can be used to beautify your code formats. It can be used to re-format code.

    The most important answer is to make TABs enter as SPACEs any time your write code.

    The Keil templates can be whatever you wish to type but I don't think it will modify any text. It's normally used to enter 'boilerplate' text. It can make your code text more beautiful if you can format beautiful text.

    www.notepad-plus-plus.org

    Bradford

  • Couldn't agree more but different developers from different companies each with their own ideas, preferences and habits on what is good coding you still end up with a mess.

    Found that using something like the built in formatter from Eclipse "forces" a uniform coding standard.

    Thank you for everyone's suggestions will be trying out a few and see which one fit best.

  • Thanks Al, Zeus and Notepad++ my preferred "general" editors as well and I always tick the "Insert spaces for Tabs" boxes.

    But I do not want to force an editor on other developers (just the philosophical debates on "normal" interface and brief will probably take 3 weeks) so I'll probably go the route of an separate formatter with command line options and let them run a batch file.

  • I do not want to force an editor on other developers
    I would hate to have an editor forced upon me, but there is no need. I can not think of any formatting standard that is 'editor dependent' e.g.
    both

    if (...){
    and
    if (...)
      {
    


    can be done with any editor.

    I have, on occasion, stated: "I will rather work with a standard I hate than no standard"

    Erik