开发者

Eclipse: make curly bracket more noticeable

I am using Eclipse. You see this ending curly bracket next to catch(FileNotFo开发者_如何学运维undException fne) {:

Eclipse: make curly bracket more noticeable

How do I make it more noticeable when I select on starting curly brackets so I can clearly see where it ends?


From Window > Preferences, go to Java > Editor and Select Matching brackets highlight and pick a color that will stand out and also make sure Highlight matching brackets is checked :)

Eclipse: make curly bracket more noticeable

I changed mine to red and this is what it looks like now.(and I did not have to restart eclipse)

Eclipse: make curly bracket more noticeable


Many thanks for tips. Indeed these are helpful. I also find following a convenient way to see how brackets can be matched. if you just want to see where the matching bracket is, use ctrl+shift+p to navigate to the matching bracket. This is especially helpful for those who have used "vi" editor a lot and were used to "%" feature of "vi" to match brackets.


In newer versions (mine is 4.2.1 installed with ADT) you can also select the type of Bracket highlighting to:

  • Matching bracket - you must have cursor right next to the bracket and it will highlight only the corresponding bracket
  • Matching bracket and caret location - same as matching bracket, only it will highlight both brackets
  • Enclosing brackets - highlight both brackets that enclosing the place where your cursor is located

For my, I prefer Enclosing brackets for better orientation in general with red color as Bala R has shown.


This worked for me . Go to Window>Preferences>General>Editors>Structured Text Editors . Select appropriate color and you are good to go.

Eclipse: make curly bracket more noticeable


For Eclipse IDE Version 2022-06.

  • Windows and Linux: Window > Preferences > Java > Editor
  • Mac: Eclipse > Preferences > Java > Editor

Eclipse: make curly bracket more noticeable

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜