Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does geany use #~ for comments in bash instead of just #?

Tags:

bash

geany

When I select a block of text in Geany (editing a bash script) and hit Ctrl + E to comment, Geany inserts #~ at the beginning of every line, instead of just #. Why?

like image 389
becko Avatar asked Mar 24 '15 12:03

becko


People also ask

What is the use of Geany?

Opening files from the command-line in a running instance Geany detects if there is an instance of itself already running and opens files from the command-line in that instance. So, Geany can be used to view and edit files by opening them from other programs such as a file manager.

Is Geany a good IDE?

Geany: Geany is not a major power player like many of the other editors in this list. It is defined more by “what it is not” than “what it is.” It is not slow, it does not have a lot of heritage from the old days, it does not have a macro capability, or much of a multi window on buffer capability.

Is Geany an IDE or text editor?

Geany - The Flyweight IDE One the primary reasons for Geany's existence is that there is a need for a decent, GUI, lightweight, cross-platform, flexible and powerful IDE/editor. Many editors meet one or more of these requirements but fall short on others. Geany attempts to hit the sweet spot.


1 Answers

Geany is adding the ~ after the # to mark these lines as been toggled. Ctrl + E is toggeling the comment in default so

# Original Comment
print ("Hello world")

becomes

#~ # Original Comment
#~ print ("Hello world")

And back again

# Original Comment
print ("Hello world")

Without some special marker it would might be hard to recognize what has been comment and what has been normal code.

like image 147
frlan Avatar answered Sep 29 '22 00:09

frlan