Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highlight BOTH matching braces into Gedit

Tags:

braces

gedit

Any way to highlight both braces on Gedit?, it's annoying when you have several braces joined and is not clear which one are you pointing.

Highlighting both braces would be a simple solution to know exactly what are the starting and ending ones.

Thanks.

like image 780
Htechno Avatar asked Jun 02 '11 22:06

Htechno


4 Answers

Actually this feature does exist, to an extent anyway, in Gedit (2, in my case). Under preferences there is a check box in the view tab on the bottom called "Bracket Matching".

With that checked you can highlight the opposite bracket delimiter by putting your cursor over its twin. It goes both ways.

However, seeing that I use ruby, which utilizes "do/end" tags instead of curly brackets, I'm still looking for a hack for that. I'll try to remember to come back and share any more information that I find.

like image 67
boulder_ruby Avatar answered Nov 05 '22 17:11

boulder_ruby


I have an option in my gedit 2.30 for this:
Edit -> Preferences -> Bracket Matching

like image 40
mbonnin Avatar answered Nov 05 '22 17:11

mbonnin


At first I could't find where the preferences are located, I chose the harder option.

1. dconf-editor:

  1. Press Ctrl + Alt + t and type dconf-editor
  2. Go to org --> gnome --> gedit --> preferences
  3. At bracket-matching and turn on flag

enter image description here

2. run in terminal:

gsettings set org.gnome.gedit.preferences.editor bracket-matching true

3. windows-way case:

In Ubuntu 18.04, Gnome 3.28 the preferences are located in the left corner near the Activities.

Preferences --> view --> Highlighting --> Highlight matching brackets

enter image description here

like image 4
akpp Avatar answered Nov 05 '22 17:11

akpp


Currently (Gedit 3.14.0) it works as it has been already mentioned:

Preferences -> View thumbnail -> Highlight matching brackets

Both brackets are highlighted.

like image 2
Titianne Avatar answered Nov 05 '22 17:11

Titianne