Menu

#67 Format Code should normalize spacing (pretty print)

open
None
7
2006-03-16
2006-02-03
No

I have a project that seems to have different amounts
of spacings for different blocks. Since it's
consistent within a given block, the code runs fine.
However, looking at the code can be an eye sore at best
and down right confusing at worst. It would be nice if
the "Format Code" feature would go through and
normalize the spacing for all blocks.

Discussion

  • Fabio Zadrozny

    Fabio Zadrozny - 2006-02-03

    Logged In: YES
    user_id=617340

    Could you give an example on how would the normalization
    work, just so that I know I got it right...

     
  • Kevin Menard

    Kevin Menard - 2006-02-05

    Logged In: YES
    user_id=131417

    Sure thing.

    For example, in the Pydev preferences, I have my tab length
    set to 4.

    I may have code that looks like the following:

    def blah():
    print "hey"
    if something:
    print "yo"

    What I would like to see is for that to get normalized to:

    def blah():
    print "hey"
    if something:
    print "yo"

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2006-02-07

    Logged In: YES
    user_id=617340

    Ok, changing it to feature request...

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2006-02-07
    • labels: 595097 -->
     
  • Kevin Menard

    Kevin Menard - 2006-02-07

    Logged In: YES
    user_id=131417

    Apologies if this is a new feature. I thought it was a bug
    with the way "Format Code" works, as what I described is the
    behavior of "Format Code" in the JDT. Thanks for moving it.

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2006-03-16
    • summary: Format Code should normalize spacing --> Format Code should normalize spacing (pretty print)
     
  • Fabio Zadrozny

    Fabio Zadrozny - 2006-03-16
    • priority: 5 --> 7
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.