CotEditor icon indicating copy to clipboard operation
CotEditor copied to clipboard

Please bring back old feature of having the option to have comments left-padded with an extra space

Open mogando668 opened this issue 1 year ago • 1 comments

Current issue

Maybe languages that begin comments with // or /* are happy with no extra padding, which is totally fine by me - everyone have their own favs. What I didn't understand was why CotEditor felt the need to remove that configuration option. Because for languages that begin comments with #, having no padding makes for rather serious visual clutter, e.g.

#GCD-based filtering has been benchmarked to be significantly slower
#than applying the psi() Reduced-totient aka Carmichael-lambda
#function [oeis.org/A002322], primarily due to universal exponent
#of the combined modulus being a known constant, enabling an exact
#exponentiation sequence derived from its divisors.

A rapid workaround I arrived at without having to manually format them with regex is TAB first before comment button, and ending up with too much padding

#    GCD-based filtering has been benchmarked to be significantly slower
#    than applying the psi() Reduced-totient aka Carmichael-lambda
#    function [oeis.org/A002322], primarily due to universal exponent
#    of the combined modulus being a known constant, enabling an exact
#    exponentiation sequence derived from its divisors.

Even though the original behavior was most ideal :

#  GCD-based filtering has been benchmarked to be significantly slower
#  than applying the psi() Reduced-totient aka Carmichael-lambda
#  function [oeis.org/A002322], primarily due to universal exponent
#  of the combined modulus being a known constant, enabling an exact
#  exponentiation sequence derived from its divisors.

Another bad workaround I discovered is editing the syntax highlighting definitions for said language, which would cause pre-existing padless comments not to highlight, and I most certainly don't think having to alter syntax definition files to account for differences in user preferences are the proper way to go.

I sincerely hope you'd consider my petition, and simply bring back the feature that has long existed in years of CotEditor releases, until very recently.

The solution you'd like

Not requesting for any new feature. Just revert the change decision and bring back the same configuration option that many has enjoyed.

Alternatives you've considered

No response

CotEditor version

5.0.7 (690)

macOS version

15.11

Additional context

No response

mogando668 avatar Dec 27 '24 05:12 mogando668

Thank you for your feedback. I understand your point because I used that option myself.

I removed it to simplify the calculation of comment toggling, as it’s quite complex. I’ve planned to improve the comment-out command in another aspect, but I haven’t completed that yet. So, please let me consider your request in conjunction with that improvement. Please give me some time.

1024jp avatar Jan 13 '25 08:01 1024jp

This feature will revert in the next minor update, CotEditor 6.1.0.

Image

1024jp avatar Oct 16 '25 02:10 1024jp

@1024jp : thanks for honoring my request. I just bought you a cup of espresso =)

mogando668 avatar Nov 04 '25 22:11 mogando668