How to use different color schemes between vim and gvim

What should I write in the file .vimrc

to check if I am running vim or gvim .

Because the color scheme colorscheme I like it very nice in vim, but ugly in gvim. So I want that when I am in vim I use this aforementioned color scheme colorscheme and when I am in gvim use a different color scheme ...

Is there any vimscript code to implement this functionality?


source to share

3 answers

These two pages contain a lot of information about color schemes and how to switch them:

It also has a problem:

if has('gui_running')
    " GUI colors
    colorscheme foo
    " Non-GUI (terminal) colors
    colorscheme bar




gvim has its own configuration file .gvimrc

. The options you put in this file will override the options .vimrc

for gvim only.



from my experience, using the Settings submenu in gVim, overrides gvimrc.

If you want to install font in gVim add these lines to your gvimrc

set guifont=WhateverFontYouWant\ 011

& replace the size with the required value



All Articles