Geany text editor commenting
26,139
Solution 1
Control-E to toggle commenting.
Solution 2
Yes there is, you just have to highlight the code you want to comment then right-click, mouse over format and and click on "Comment Line(s)" to comment the lines. To uncomment,instead of selecting "Comment Line(s)" select "Uncomment Line(s)".
Solution 3
Control + E
Edit default comment: Preferences > Editor > Features > Comment toggle marker
Author by
Spencer Cooley
Updated on July 09, 2022Comments
-
Spencer Cooley almost 2 years
Is there a way to highlight a section of code to be commented out in one swoop using geany text editor?
-
becko about 9 yearsWhy does geany use
#~
for comments in bash instead of just#
? -
pabouk - Ukraine stay strong almost 9 years@becko: In fact it inserts three characters
#~
. The last one is a space. I think the reason is to allow Geany to detect its own comments to be able to remove them when uncommenting and not to touch comments created different ways. -
geira almost 9 years@becko: You can turn that off under "Comment toggle marker" in Preferences (I prefer setting it to a single space).
-
Timo over 3 years@becko, it is in preferences -> editor -> functions. I want to have
#
(with space) but this does not work. Leaving empty the input will result to#
which is not the standard commenting. -
Lonnie Best almost 2 yearsIn version 1.37.1, I don't understand why Geany has shortcuts displayed in the menus for just about everything except "commenting and un-commenting". This control-E shotcut doesn't act the same as the
Edit > Format > Comment Line(s)
(which doesn't insert that~
).