Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YES and NO. #28

Open
ghost opened this issue May 18, 2014 · 2 comments
Open

YES and NO. #28

ghost opened this issue May 18, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented May 18, 2014

It would be nice if YES and NO could be seen in a Red/Green colour.

@kolinkrewinkel
Copy link
Owner

Will look into this through a more general approach...to allow users to set custom colors for any keyword. I could see people wanting to make, say, "return" or "break" also be red or something.

@rolandleth
Copy link
Contributor

This would be pretty awesome :D

edit:

Here's a temporary approach:

NSString *variable = [[self string] substringWithRange:newRange];
if ([variable isEqualToString:@"false"] || [variable isEqualToString:@"NO"] || [variable isEqualToString:@"break"] || [variable isEqualToString:@"defer"]) {
    return [NSColor colorWithCalibratedRed:0.83 green:0.45 blue:0.59 alpha:1];
}
else if ([variable isEqualToString:@"true"] || [variable isEqualToString:@"YES"] || [variable isEqualToString:@"continue"] || [variable isEqualToString:@"guard"]) {
    return [NSColor colorWithCalibratedRed:0.41 green:0.76 blue:0.57 alpha:1];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants