[wingide-users] tab should ignore indentation of
preceding commented out lines
Mitchell L Model
MLMConsulting at Comcast.net
Thu Mar 25 10:10:03 MDT 2010
On Mar 24, 2010, at 10:34 PM, Wingware Support wrote:
> Mitchell L Model wrote:
>> When I comment-out a line with one or two #'s in the first column
>> of the line (and similarly for other columns), Wing loses track of
>> the indentation level where the next non-commented line should go
>> -- I hit TAB and the line goes to column 1. It should ignore
>> intervening comment lines. I would say that in general the editor
>> should ignore everything starting with a # to the end of the line
>> on which it appears, just like the compiler, except for the few
>> commands that deal explicitly with commenting.
> This isn't really so straight forward. If you are typing something
> like this it gets annoying to ignore the commented line also:
> def x():
> # do something
> if whatever:
> print 'x'
> # do something else
> |<- want to indent to here, not one level further
> This is a fairly common case so it's generally better to pay
> attention to the comment.
> If you set the Editor / Block Comment Style preference to Indented
> Comment and use the provided
> comment in/out feature then you'll tend to have fewer problems
> around commented out code.
>> There is a similar issue with large chunks of code that are
>> "commented out" by enclosing them in triple quotes, but that's
>> uncommon enough -- and subsequent code is unlikely enough to be
>> related to what comes before the commented out code -- that there's
>> no point in worrying about it.
> Some people use block comments in the same way as others do
> comments, so it ends up being
> a similar case as far as benefit of ignoring vs. not.
> At one point I thought we should ignore ## in column zero but I
> think there may be issues
> with that also. I'm not remembering the details at the moment.
Thanks. I just wrote a long dissertation on what I thought the
behavior of starting a new line after lines beginning with # and ##,
and whether the comments began at column 0 or not. While writing it I
kept experimenting in Wing to see what it was doing for the various
conditions, trying to characterize the problem I thought I was having.
In the end I couldn't find anything reasonable to say.
The only problem I was able to verify was that tab wouldn't move off
of column 0 after column-0 ## lines in between methods of a class. I
can live with having to type four spaces in that situation if it is
the only one like it.
More information about the wingide-users