Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool to Comentent lines fail and can be more elegant #3554

Open
osergioabreu opened this issue Sep 10, 2023 · 2 comments
Open

Tool to Comentent lines fail and can be more elegant #3554

osergioabreu opened this issue Sep 10, 2023 · 2 comments

Comments

@osergioabreu
Copy link

osergioabreu commented Sep 10, 2023

The tool to comment/uncomment Lines could be more elegant, adding all the # to the BEGINNING of lines!
And I saw a bug, it failing today, couldn't uncomment had to use REPLACE tool.
Works well to comment, but to uncomment, FAILED.

      My suggestion is like this:
     Nowadays            |         Desired
     ----------------------------------------------------
     # code                    #        code
          # code               #              code 
           # code              #              code
@JohnCC330
Copy link

JohnCC330 commented Sep 15, 2023

You did not mention which language you were working in. From the '#', I suspect it was Python.

Note that uncommenting with ^E only works if the line was commented with the same command.
By default, Geany comments with '# ~ ' (you can change that in Preferences | Editor | Toggle comment marker).
Take care with the ' ' (space) at the end of that field - it's there! Of course '#' is implied - that depends on Python.

So, if you comment with ^E, it inserts '# ~ '. If you try to uncomment, that will only work if it finds
'# ~ ' in the line(s).

About the comment formatting - That is a question of taste, I'm afraid...

@elextr
Copy link
Member

elextr commented Sep 16, 2023

Since nobody has asked for this formatting before (@osergioabreu you did search for existing open or closed issues before you raised this didn't you? 😁) users either don't care because they only use it to temporarily comment out code and will remove it quickly, or they like it like that.

So if "somebody" made a pull request which made the formatting an option it likely would be accepted so both tastes are accommodated.

Or it was put in a plugin (if it isn't in one already?)

@JohnCC330 wrote:

Of course '#' is implied - that depends on Python.

Specifically it is the single line comment setting in the filetype file for the filetype.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants