Highlight BOTH matching braces into Gedit
Asked Answered
G

5

16

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.

Gentlemanfarmer answered 2/6, 2011 at 22:5 Comment(0)
G
22

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.

Geoponics answered 9/8, 2012 at 23:26 Comment(0)
S
7

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

Stage answered 15/7, 2011 at 9:23 Comment(1)
That option is not default. I have version 2.3 and it has no such option. Bracket Completion, yes, but that's not Bracket Highlighting.Geoponics
A
5

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

Avoid answered 19/3, 2019 at 21:48 Comment(0)
F
2

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

Preferences -> View thumbnail -> Highlight matching brackets

Both brackets are highlighted.

Frobisher answered 26/1, 2015 at 16:0 Comment(0)
P
1

I suppose you enabled bracket matching (as in mbonnin's answer), but only one bracket is highlighted.

I made a bug report about that (see Highlight the 2 matching brackets) and it was fixed in a recent version of gedit (I think only version 3 contains this fix).

Prattle answered 20/8, 2011 at 0:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.