Make Xcode highlight selected symbol more

Xcode

Xcode Problem Overview


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

Xcode Solutions


Solution 1 - Xcode

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.

Solution 2 - Xcode

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.

Solution 3 - Xcode

This is not exactly what you are looking for, but you may want to check out the Polychromatic Xcode plugin (most easily installed via Alcatraz). It gives every symbol a unique color, which is used consistently throughout. So every instance of myVar might be blue, and every instance of myOtherVar might be red.

Solution 4 - Xcode

This plugin does what you want. It's available through Alcatraz:

https://github.com/keepyounger/HighlightSelectedString

Solution 5 - Xcode

I don't know if this is still relevant, but when you hover with the cursor on a symbol a small selection menu shows up and you can select "Edit All in Scope". This highlights all such symbols in a much more visible way. As the name suggests, this functionality is meant for a higher purpose, but I think it comes in handy even just for highlighting. I don't know if this feature was available before Xcode 5.

Solution 6 - Xcode

community!

I have the same trouble and found something like that. (where the "currencyId" i select,another its work of plugin)

enter image description here

Its, i guess, do the same thing like [Cmd+E, Cmd+F and Cmd+G combo] But its easier,you must only select word in your code.

How to install it to Your XCode:

  1. Launch XCode

  2. On top menu select Window->Package Manager

  3. In search type "highlightSelectedString" enter image description here

  4. Install it!

  5. ?

  6. Profit

And also you can change color of highlighting!!!

  1. go to Edit->Set Highlight color

  2. Choose your color

Solution 7 - Xcode

ok go to xcode select preferences pop over will come select fonts and colors down u can see 4 buttons,with 1 having name selection,click and choose any deep color

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionTomas AndrleView Question on Stackoverflow
Solution 1 - XcodeVivian_S.O.View Answer on Stackoverflow
Solution 2 - XcodeBalazs VadnaiView Answer on Stackoverflow
Solution 3 - XcodeZev EisenbergView Answer on Stackoverflow
Solution 4 - XcodeZev EisenbergView Answer on Stackoverflow
Solution 5 - XcodeEmerald WeaponView Answer on Stackoverflow
Solution 6 - XcodeMr.FingersView Answer on Stackoverflow
Solution 7 - XcoderajView Answer on Stackoverflow