2

The default for Terminal.app profile Pro is a black background with ANSI colors. Since the background is black the preferred color setting for Vim is background=dark. In this combination red text (emitted from syntax highlighting) is indistinguishable from grey text (at least for me):

enter image description here

"Foo" is red, "bar" is grey. A color picker reveals that red is rendered as R=243, G=222, B=222, so yes it actually is a slight bit more red than grey.

None of the color changing options in Terminal.app preferences allows me to change this to something that makes me recognize it as red. So how can i make red look red?

Edit (Further information from the comments): The issue is reproducible with any Vim (local or ssh remote, from OS X or mac ports) as long as Terminal.app is used for display.

5
  • Can you please add a link to a screenshot to illustrate the problem?
    – nohillside
    Aug 21, 2012 at 17:41
  • postimage.org/image/w0uhuvw4p is a screenshot Aug 21, 2012 at 17:51
  • Your "red" is far less red than mine. Do you have transparency set for the terminal?
    – nohillside
    Aug 28, 2012 at 17:07
  • You can actually see the transparency setting in the screenshot. There is another Terminal.app with Text behind. That said, I did not actively change the default transparency setting. Sep 3, 2012 at 13:06
  • Now the problem gets worse. I installed Xquartz. Started an xterm. Start Vim. Colors are as I would expect them. I press any key (such as Ctrl-l) and the colors are "crippled". Sep 3, 2012 at 13:55

1 Answer 1

1

The problem is likely due to your vim settings rather than your terminal settings.

The color you mentioned is pretty close to color 224 (of 256 colors), so you might try looking in your vim colorscheme to see if that color is used in a ctermfg= declaration.

To test and see if I'm right you could try

:syn match Foo /foo/
:hi Foo ctermfg=red

If that turns the word foo red then you know your terminal's red is working properly and it will be an issue with your vim settings.

7
  • Good catch. It is neither an issue of Terminal.app nor an issue of my color scheme. Using your example red is red. And the issue is reproducible using vim -u /dev/null. So it very likely is a bug in the Vim shipped with OS X. Aug 28, 2012 at 11:20
  • Do you also happen to know how to fix the default color scheme? I actually liked the default shipped with Debian, Fedora, SuSE and RHEL. Aug 28, 2012 at 11:52
  • Well, as I said you could look for 224 in the default colorscheme. For example, use :e $VIMRUNTIME/colors/default.vim then /224<Enter>. It might be something close to but not exactly 224. If you find it just change it to red. Better yet, copy that file to ~/.vim/colors and edit it there so you have a preserved copy.
    – Conner
    Aug 28, 2012 at 13:34
  • The file you mention does not list any colors. It just resets the configuration. Besides sshing to a Debian machine gets me "broken" colors as well. Sshing to the same machine from Debian gets me "usable" colors. So we can conclude that vim is not the cause. Aug 28, 2012 at 14:05
  • Hm, then I'm lost. If it doesn't work when you ssh then surely it must have something to do with your terminal colors and not the OSX version of vim.
    – Conner
    Aug 28, 2012 at 14:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .