Reputation: 5116
What should I write in my .vimrc
file to test whether I am running vim or gvim.
Because the colorscheme I like very much is beautiful in vim, but is ugly in gvim. So I want it that when I am in vim, I use this aforementioned colorscheme, and when I am in gvim, use another colorscheme.
Is there any vimscript code can implement this function?
Upvotes: 6
Views: 2837
Reputation: 834
from my experiences using the Settings sub menu in gVim does override the gvimrc.
If you want to set the font in gVim add these lines to your gvimrc
set guifont=WhateverFontYouWant\ 011
& substitute the size for the value you require
Upvotes: 0
Reputation: 7413
gvim has its own configuration file, .gvimrc
. Settings that you put in this file will override .vimrc
settings for gvim only.
Upvotes: 4
Reputation: 2671
These two pages have a lot of info on color schemes and how to switch them: http://vim.wikia.com/wiki/Switch_color_schemes http://www.indelible.org/ink/vim-colorschemes/
It also features the issue you have:
if has('gui_running')
" GUI colors
colorscheme foo
else
" Non-GUI (terminal) colors
colorscheme bar
endif
Upvotes: 20