Text Editing - Insert comments (#) in Ubuntu using gedit or another text editor

I program in a special language called macro language.

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

I want to save time by commenting out a few lines of code at the same time with gedit or another program (gedit is nice in terms of colors, which makes the code more readable).

How can i do this?

Thanks in advance.

+4
source share
3 answers

May need it # apt-get install gedit-plugins.

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

ctrl-m ctrl-shift-m, .

(, , SuperUser, .)

+6

, ( ... ) ~/.local/share/gtksourceview-3.0/language-specs/thingy.lang:

<?xml version="1.0" encoding="UTF-8"?>
<language id="thingy" _name="Thingy Code" version="2.0" _section="Sources">
  <metadata>
    <property name="line-comment-start"># </property>
    ...
  </metadata>
  <styles>
    ...
  </styles>
  <definitions>
    ...
  </definitions>
</language>

, langage /usr/share/gtksourceview-3.0/language-specs/, ( , XML ).

0

There is a plugin for gedit that should help in your needs. You can get this from github:

https://github.com/jessevdk/gedit-multi-edit

-1
source

Source: https://habr.com/ru/post/1570442/


All Articles