Wish Block comment

Discussion in 'Bugs & wishlist' started by Troberg, Apr 20, 2015.

  1. Troberg

    Troberg Well-Known Member Licensed User

    It would be very nice to have a way to comment out an entire block with simply a start and end marker, both for commenting out code and to avoid having to prefix every line with a ' in comment headers.

    Example:

    Code:
    <<
    This 
    is all comments
    This 
    is also a comment
    Even more comments
    >>
    It would also be nice if the entire line was treated as a comment for block comments. I use Another background color for comments, and it's nice if the comment headers don't look like a bar graph.
     
    Eme Fibonacci likes this.
  2. ac9ts

    ac9ts Active Member Licensed User

    There is a block comment icon in the IDE. It is between the search binoculars and the navigate arrows. Highlight the block and press the comment icon. This will also comment your comments so when you un-comment the section, the original comments will be intact. Ignore this if you already knew of this feature.
     
  3. Troberg

    Troberg Well-Known Member Licensed User

    I know about that, but it simply makes each line a line comment.

    Which is neater, this:

    Code:
    ' CurrentVersion: 1.0
    ' Maintainer: Troberg

    'Todo
    'If no valid bearing, get from device compass instead

    'Future
    '...

    'Done
    '1.0
    'First version
    or this:

    Code:
    <<
    CurrentVersion: 
    1.0
    Maintainer: Troberg

    Todo
    If no valid bearing, get from device compass instead

    Future
    ...

    Done
    1.0
    First version
    >>
    Now, imagine the comments above with a colored background. It looks like a bar graph. Imagine instead that the block comment lines had a background that extended the entire page width. I would have a nice, square, differently colored background comment header.
     
  4. ac9ts

    ac9ts Active Member Licensed User

    I see your point but if using the default colors (as shown above), it's hard to see where the comments are vs. the code if the commented code stays the same color as un-commented code. This could be really confusing if you had multiple screens worth of commented code. Of course, it all depends on the color scheme as you mentioned as well as personal preference. My colors are below and (for me) it's easier to see the commented section. I don't like the bar graph look either so that is why my color scheme is what it is.

    N1.jpg N2.jpg
     
  5. Troberg

    Troberg Well-Known Member Licensed User

    I didn't make myself clear. Comments should still look like comments, just that the comment style should fill the entire line.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice