Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In my .vimrc, I want to check if I'm in MacVim vs. regular vim so I can optionally set some MacVim-specific settings, which should not be applied to regular vim.

How do I do this?

share|improve this question
add comment

1 Answer

up vote 15 down vote accepted

I just found one way to do it:

if has("gui_macvim")
    " set macvim specific stuff
share|improve this answer
add comment

Your Answer


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.