开发者

Make Xcode highlight selected symbol more

开发者 https://www.devze.com 2023-04-03 18:37 出处:网络
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 highl开发者_开发百科ight the ba

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 highl开发者_开发百科ight the background color of the symbol, like Eclipse does it? I can't find anything in the Preferences panel.

Xcode:

Make Xcode highlight selected symbol more

Eclipse:

Make Xcode highlight selected symbol more


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.


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.


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.


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

https://github.com/keepyounger/HighlightSelectedString


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.


community!

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

Make Xcode highlight selected symbol more

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"

    Make Xcode highlight selected symbol more

  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


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

0

精彩评论

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