Page 2 of 2

Re: Please ignore comments for indentation

Posted: Wed Nov 20, 2013 6:24 pm
by Thunder93
I have no problem with the block comments with the semicolon at the very beginning of the line. However, it's not constant positioning. Removing the commented line or lines don't bring back the original positioning / format. Moving, relocation of these lines also gets messy.

I think this block comments stuff should be consistent regardless, and currently it's not.

Re: Please ignore comments for indentation

Posted: Wed Dec 11, 2013 5:17 pm
by blueznl
I actually like the current way comments are implemented, so I vote for no change! Oh. Can't vote... oh well.

If you're desperately in need of block comments, I'd suggest one of two options:

1. StartComment and EndComment and everything in between is ignored... (A bit how my wife sees me, as I seem to be living within a StartComment / EndComment structure, alas 8) )

or

2. The double semi colon, aka ';;'

Code: Select all

for a = 1 to 10
  for n = 1 to 10
    ;
    ; regular comment
    ;
;;
;; unadjusted comment
;;
    ;
  next n
next a

Re: Please ignore comments for indentation

Posted: Tue May 06, 2014 6:29 pm
by freak
netmaestro wrote:Here's a start:

Code: Select all

If prefs->comment_alignment is true
  If this line contains a semicolon
    If the line above this line contains a semicolon
      Move the comment portion of this line only such that the semicolons are aligned
    EndIf
  EndIf
EndIf
FYI: I just implemented this way for the next release (minus the prefs option). Your original example now aligns nicely even after a reformat. It works quite well and is not really in the way imho, so I don't think there is need for a configuration option.

A second feature that comes with it is the ability to align/shift the comments of a selected code block with Ctrl+Left and Ctrl+Right :wink:

Re: Please ignore comments for indentation

Posted: Tue May 06, 2014 6:33 pm
by Thunder93
Looking forward. :D

Re: Please ignore comments for indentation

Posted: Tue May 06, 2014 9:05 pm
by Little John
freak wrote:FYI: I just implemented this way for the next release (minus the prefs option). Your original example now aligns nicely even after a reformat. It works quite well and is not really in the way imho, so I don't think there is need for a configuration option.
You did it without an additional prefs option, and without an additional special character. That sounds good. :)
Thanks!

Re: Please ignore comments for indentation

Posted: Wed May 07, 2014 7:43 am
by davido
@freak,

Thank you, very much. :D

Re: Please ignore comments for indentation

Posted: Fri May 09, 2014 7:25 am
by netmaestro
Thanks, sounds perfect! :D