开发者

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:

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

Highlight BOTH matching braces into Gedit

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

Highlight BOTH matching braces into Gedit


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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜