How does one change the color for text highlighting in Xcode 4 for warnings and errors? [duplicate]
Asked Answered
A

3

16

Possible Duplicate:
Fix for Xcode's indiscernible highlighting of inline errors?

Does anyone know how to change the color of the in-line highlighting for warnings and errors in Xcode 4? With almost every theme, the yellow warning highlight makes the underlying code impossible to read. Example picture

Accommodative answered 27/9, 2011 at 19:5 Comment(2)
Why can't you use the default white background theme? It is perfectly readable under warnings and errors.Squint
White background? In an IDE? Are you crazy??? :oSaxen
C
12

Just came across this, which seems to be able to modify some of Xcode's behaviors by creating some sort of plugin. Maybe one can be developed to change text highlight color. http:/github.com/davekeck/Xcode-4-Fixins

Update:

I've finally managed to implement a Xcode "fixin" to do it.
text highlight for dark backgrounds

You just need to open the project and build it. Doing so will install an Xcode plugin called "XCFixin_CustomizeWarningErrorHighlights.xcplugin" into ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins. You can of course customize the colors to your liking.

Get the "fixin" here:

https://github.com/armadillu/Xcode-4-Fixins/tree/master/XCFixin_CustomizeWarningErrorHighlights

Coulee answered 2/5, 2012 at 21:15 Comment(7)
Wow. Amazing. These Fix-Ins solve almost ALL of my Xcode pet-peeves. Is there one to fix sytax highlighting, too? Or maybe re-enable plug-in support? My compliments to the chef.Cytogenesis
I dont understand how to change the settings. The readme says "change the scheme" what scheme?Glaser
Doesn't work for me at all - I think I'm using it wrong. I downloaded all of the projects, opened the warning-highlight in xcode 4.3, added 2 test lines with unused variables, Build the project, quit and restarted xcode, no change. I even changed the warningColor to red (1,0,0) instead of yellow to see if the change was picked up... nothing happening, what am I missing.Glaser
You should go to github.com/armadillu/Xcode-4-Fixins and download the zip file (cloud icon with arrow). Unzip, go into the XCFixin_CustomizeWarningErrorHighlights dir and open the Xcode project in there. Once it's open, just build the project on Xcode. Then quit and relaunch Xcode, and from now on, all the inline warnings and errors should look as they do in the picture above. You can tweak the colors to your liking by modifying the RGB values within the project. This requires Xcode 4.3 or greater for it to work.Coulee
I did all of that before my prior comment. But nothing changes. I set my warningColor to 1,0,0, just to see if the fixin was having any effect, and nothing changed -I still see the original builtin highlight. I changed my theme from Dusk to Midnight to see if that did anything - no dice. I'm doing something wrong. My XCode is 4.3. My Scheme is "XCFixin_CustomizeWarningErrorHighlights>My Mac 64-bit", I build the project with command B, then quit xcode altogether. Restart - no change.Glaser
Got it! Your last commit to update it for XCode 4.4 breaks it for XCode 4.3. I reversed the changes you put in that commit (basically a new signature for initWithHighlightColor) and it now works - thanksGlaser
Thanks for this! I changed the line opacity to 0.05, which is more than obvious enough to me on my dark background while allowing the text to actually be readable. :)Chisholm
F
1

There is no (official) way to do this and I believe that it's like that for a reason... We all know how much attention to details and UI paradigms Apple is paying. An error colored in Green for example would break that paradigm and possibly confuse the user. That being said, I think that a (somewhat) solution would be instead of recoloring the warning/error bubbles, to recolor the theme in such a way that every color would make a strong contrast with red/yellow (ie avoid reddish/yellowish tones) tints.

Faunie answered 30/4, 2012 at 14:43 Comment(0)
F
0

there is no options which you can change color of warning and errors.its inbuilt with Theme you are using for xcode. but you can change the style from xcode->fonts & colors and select different theme.

Filch answered 28/9, 2011 at 12:47 Comment(1)
I'm asking about the highlighting for warnings, not the text colors.Accommodative

© 2022 - 2024 — McMap. All rights reserved.