#1547 Code formatter causes problems with commented code blocks

Editor (491)

I sometimes use the PyDev feature "Python Toggle Comment" (Ctrl+/) on a block of code. When the setting "Spaces in comment start" is set to "at least one space" this causes problems when I toggle off the comments (if I've saved the file in the interim), since the space added by the formatter is not removed and now my code is at an illegal indent level. Not sure what to suggest - perhaps have the toggle comment feature insert/remove as many space as the current formatter setting? Some corner cases will probably need to be considered, or perhaps there's another better approach that isn't occurring to me?


  • Shi Sherebrin

    Shi Sherebrin - 2012-12-25

    Clarification: this only applies when the indent-level of the code block in question is zero.

  • pavel

    pavel - 2013-04-03

    See this issue in PyDev
    Also on each comment\uncomment with Ctrl+/ one space is being added to empty stings.