Highlight BOTH matching braces into Gedit
Any way to highlight both braces on Gedit?, it's annoying when you have several braces joined and is not clear wh开发者_StackOverflow中文版ich one are you pointing.
Highlighting both braces would be a simple solution to know exactly what are the starting and ending ones.
Thanks.
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.
I have an option in my gedit 2.30 for this:
Edit -> Preferences -> Bracket Matching
At first I could't find where the preferences are located, I chose the harder option.
1. dconf-editor:
- Press
Ctrl + Alt + t
and typedconf-editor
- Go to
org
-->gnome
-->gedit
-->preferences
- At
bracket-matching
and turn on flag
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
Currently (Gedit 3.14.0) it works as it has been already mentioned:
Preferences -> View thumbnail -> Highlight matching brackets
Both brackets are highlighted.
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).
精彩评论