Search code examples
vimiterm2

Vim Colors Bright/Faded in iTerm2, but not in Macvim


My screen looks like this enter image description here when I open vim in iTerm2, when it is supposed to look like this.

When I open vim in Macvim, it looks as it is supposed to.

I have tried:

  • Suggestions from here, including getting the latest nightly build of iTerm2 and the newest iTerm themes
  • The first answer from here, which is to insert hi Normal ctermbg=16 in my vimrc

Does anyone have any ideas for diagnosis or solving this?

Thanks in advance.


Solution

  • The colorscheme you are using depends on the 16 "ANSI" (yes I know, there's no such thing as "ANSI" colors and so on but that's how they are called everywhere so let's keep it simple and… incorrect, shall we?) defined in your terminal emulator.

    If you want Vim to look like that screenshot, you'll need to set up iTerm to use that colorscheme's specific colors. This could be done manually but the author has added a preset to his repo.

    How to use a preset:

    1. Preferences… → Profiles → your current profile → Colors
    2. Load Presets… → Import…
    3. Choose the bundled preset
    4. Load Presets… → coffee