Thread: Code formatter

  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    36

    Code formatter

    Hi, i'm using VS.NET 2003 and the default formatting is pretty good, but it's not perfect (when you copy/paste, or something like that). Are there any 3rd party apps or some option to correctly format selected code or the entire file?

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    I think there's a GNU beautifier. Is that what you want? Or do you want to colour your code to post it here?

    i'm using VS.NET 2003 and the default formatting is pretty good, but it's not perfect (when you copy/paste, or something like that).
    Turn off tabs. I don't know. What do you mean?
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #3
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Quote Originally Posted by ryeguy
    Hi, i'm using VS.NET 2003 and the default formatting is pretty good, but it's not perfect (when you copy/paste, or something like that). Are there any 3rd party apps or some option to correctly format selected code or the entire file?
    There is no "correct" way to format the code. You can do it any way you like. But there are guidelines about how many (most?) programmers do it. That doesn't mean my method is any more or less "correct" then yours. I've seen several huge flam-wars about this topic

  4. #4
    Registered User
    Join Date
    Jul 2005
    Posts
    69
    If I understand correctly... You could run the code through Astyle
    Regards,
    Brian

  5. #5
    Registered User
    Join Date
    Sep 2005
    Posts
    36
    yeah thanks br5an

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linux C source code formatter utility
    By BobS0327 in forum Tech Board
    Replies: 2
    Last Post: 04-08-2006, 06:53 PM
  2. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 12:38 PM
  3. C++ Code Formatter
    By Visual Develope in forum C++ Programming
    Replies: 4
    Last Post: 05-28-2002, 04:18 PM
  4. Replies: 0
    Last Post: 02-21-2002, 06:05 PM