Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
    
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. –  Hermann Ingjaldsson 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. –  Hermann Ingjaldsson Sep 21 '12 at 19:15

1 Answer 1

up vote 3 down vote accepted

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

share|improve this answer
    
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. –  Hermann Ingjaldsson Nov 9 '12 at 6:57

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.