Eclipse: make curly bracket more noticeable

前端 未结 4 434
轻奢々
轻奢々 2021-02-02 07:03

I am using Eclipse. You see this ending curly bracket next to catch(FileNotFoundException fne) {:

\"ent

相关标签:
4条回答
  • 2021-02-02 07:38

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

    enter image description here

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

    enter image description here

    0 讨论(0)
  • 2021-02-02 07:38

    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.

    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2021-02-02 07:59

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

    0 讨论(0)
提交回复
热议问题