I'm in gnome-terminal on Linux Mint 13. (Mate)

Whatever color scheme I set for the terminal overrides the color scheme i have set for Vim.

How can i stop that from happening?

I have read this: http://vim.wikia.com/wiki/256_colors_setup_for_console_Vim at 'Overriding the terminal's default terminfo', but it's very fuzzy and I simply can't use it to solve this.

What is it that I actually do to override the terminal's color settings?

  • Well, since you're running in X11 anyway, the easiest way, assuming you're running vim locally, would be to just use gvim. (Just want to point this out in case you're unaware of gvim.)
    – derobert
    Sep 21 '12 at 15:16
  • I frequently run Vim remotely.
    – john-jones
    Sep 21 '12 at 16:34
  • Also, I guess I should point out vim's netrw support. E.g., gvim sftp://user@remote/file.txt works. Check out :help netrw.
    – derobert
    Sep 21 '12 at 17:39
  • I don't understand - xterm doesn't have color schemes. Are you talking about XResources?
    – jw013
    Sep 21 '12 at 19:11
  • In my xterm terminal, i can go edit->profile_preference->colors and change the colorscheme of the terminal. It is that setting that I'm talking about.
    – john-jones
    Sep 21 '12 at 19:15

The important part of that wikia link is:

:set t_Co=256

Entering this in normal mode (or putting it in your ~/.vimrc) will force vim to try to use 256 colors, which should override gnome-terminal's color scheme.

Apparently, while gnome-terminal is capable to 256 colors, it doesn't advertise that fact in a way that vim can detect, which is why setting t_Co manually is often necessary.

See also the vim help file for t_Co: http://vimdoc.sourceforge.net/htmldoc/term.html#t_Co

  • I've gone back to Lubuntu 11.04 partly because of this color problem, so I can't test this. But it looks promising and thanks.
    – john-jones
    Nov 9 '12 at 6:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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