Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using the same color scheme for Vim both in the Terminal and in MacVim, but they end up getting totally different colors.

Terminal:

terminal Vim

and MacVim:

macvim

Why is this happening? It does this with almost every single color scheme, and they all look bad in the terminal.

share|improve this question
    
Aren't these simply the terminal colors configured in Terminal » Preferences » Settings » (some profile) » Text » ANSI colors? Click a color, get the color picker (magnifying glass icon), and grab colors from MacVim. Adjust until it matches. –  Daniel Beck Dec 11 '11 at 17:06
    
MacVim color scheme definitions. THey are separated into GUI and command line. The GUI ones use color names like in CSS. Not sure what to make of it. –  Daniel Beck Dec 11 '11 at 17:13
add comment

2 Answers

Terminal colors are determined by the terminal application. Just because Vim is asking for color 4 (ANSI Blue) doesn't mean Terminal has the same RGB definition for ANSI color 4 as MacVim.

You can use Mike Solomon's TerminalColors utility to modify the default ANSI colors in Terminal so that they match those in MacVim.

share|improve this answer
add comment

You will probably need to override your terminal's colors so that they are exactly the same as in Macvim.

Do you use Terminal.app or iTerm2.app? What version of Mac OS X?

Both iTerm2 and the latest version of Terminal on Lion are supposed to support 256 colors but these can be very different from those you can use in MacVim.

However I don't think you will be able to achieve the exact same look.

share|improve this answer
    
I have Terminal.app on OS X Lion. I can actually set the ansi colors in the terminal preferences directly, but won't that break colors somewhere else? –  Jakub Arnold Dec 16 '11 at 21:28
    
Those settings are going to apply to everything you do in your shell, of course, some programs may make assumptions about your colors and those can be wrong. But the colors you are supposed to use in a 256 colors compatible colorscheme are the names of the X11 colors like Medium Spring Green. I don't know how the X11 colors supported by Terminal.app map to those used by MacVim: do both of them refer to the same? Do both of them use built-in definitions? Only Terminal.app? Only MacVim? How many colors are you able to set in Lion's terminal.app? –  romainl Dec 17 '11 at 8:03
    
If the same X11 color name gives different results that means it probably means that both apps use different definitions. Find both and compare. –  romainl Dec 17 '11 at 8:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.