1

I use gui version of macvim for my general development activites. I use mvim from terminal also as I've mapped mvim to vim alias.

How can I open different color scheme in mvim based on whether they are opened in gui version or terminal version?

I want to set solarized colorscheme for gui version of macvim and grb256(or anyother) colorscheme in terminal version of mvim.

How can we do this ?

1 Answer 1

3
if has("gui_running")
    colorscheme solarized
else
    colorscheme grb256
endif

And you can set any other things in there you prefer. This is the full block from my .vimrc:

if has('gui_running')
    let g:solarized_contrast = 'high'
    set guifont=Mensch:h14
    set antialias
    set background=light
    colorscheme solarized
else
    set background=dark
    colorscheme cobalt2
endif

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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