Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make Xcode highlight selected symbol more

Tags:

xcode

Xcode underlines all occurrences of a symbol that the cursor is on. However, the underline doesn't exactly "pop out" in the source code. Is it possible to make Xcode highlight the background color of the symbol, like Eclipse does it? I can't find anything in the Preferences panel.

Xcode:

Xcode

Eclipse:

Eclipse

like image 894
Tomas Andrle Avatar asked Sep 07 '11 11:09

Tomas Andrle


2 Answers

XCode already has this feature but there's a delay on it after you single click on the text you want to highlight. You can set the delay to 0 seconds.

XCode > Preferences > TextEditing > HighlightInstancesOfSelected and set Delay to 0s

This works but I wasn't able to change the color of it. It is a pale blue color and a bit hard to see.

like image 174
Vivian_S.O. Avatar answered Sep 19 '22 03:09

Vivian_S.O.


Search for AutoHighlightSymbol in Alcatraz (Xcode's package manager). It will do exactly what you want.

After you have the plugin installed, select Editor > Edit Highlight Color. This is transparent by default, so you have to pick one that suits your color theme best.

EDIT: Now that Alcatraz is gone, you're going to have to install the plugin manually. Download from their GitHub, build the project and restart Xcode - which needs to be unsigned for being able to load 3rd party bundles. More info on this here.

like image 29
Balazs Vadnai Avatar answered Sep 17 '22 03:09

Balazs Vadnai