Text editing - insert comments (#) in Ubuntu with gedit or other text editor

André Miguel Monteiro picture André Miguel Monteiro · Jan 8, 2015 · Viewed 9.8k times · Source

I am programming in a dedicated language called macro language.

To comment I need to add # at the beginning of the line.

What I want is, in order to spare time, to comment several lines of code at same time with gedit or other program (gedit is nice in terms of the colors, which make the code more readable).

How can I do it?

Thank you in advance.

Answer

David X picture David X · Jan 8, 2015

Possibly need # apt-get install gedit-plugins.

Then go to edit > preferences > plugins > enable "code comment".

Then use ctrl-m to comment and ctrl-shift-m to uncomment.

(Technically, I think this would go in SuperUser though.)