在 Gedit 中突出显示两个匹配的大括号
有什么方法可以在 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
事实上,这个功能在某种程度上确实存在于 Gedit 中(在我的例子中是 2)。在首选项下,底部的视图选项卡中有一个名为“括号匹配”的复选框。
选中后,您可以通过将光标放在其孪生上来突出显示相反的括号分隔符。这是双向的。
然而,看到我使用 ruby,它使用“do/end”标签而不是大括号,我仍在寻找解决方案。我会尽量记得回来分享我找到的更多信息。
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.
我的 gedit 2.30 中有一个选项:
编辑->首选项->支架匹配
I have an option in my gedit 2.30 for this:
Edit -> Preferences -> Bracket Matching
起初我找不到偏好设置在哪里,我选择了更难的选项。
1. dconf-editor:
Ctrl + Alt + t
并输入dconf-editor
org
-->侏儒
-->gedit
-->preferences
bracket-matching
并打开标志2. 在终端中运行:
3. windows-way 情况:
在 Ubuntu 18.04 中, Gnome 3.28 首选项位于活动附近的左角。
首选项
-->查看
-->突出显示
-->突出显示匹配的括号
At first I could't find where the preferences are located, I chose the harder option.
1. dconf-editor:
Ctrl + Alt + t
and typedconf-editor
org
-->gnome
-->gedit
-->preferences
bracket-matching
and turn on flag2. run in terminal:
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
目前(Gedit 3.14.0)它的工作原理已经提到过:
首选项 ->查看缩略图->突出显示匹配的括号
两个括号均突出显示。
Currently (Gedit 3.14.0) it works as it has been already mentioned:
Preferences -> View thumbnail -> Highlight matching brackets
Both brackets are highlighted.
我想您启用了括号匹配(如 mbonnin 的答案),但只有一个括号突出显示。
我对此做了一个错误报告(请参阅突出显示 2 个匹配的括号)已在最新版本的 gedit 中修复(我认为只有版本 3 包含此修复)。
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).