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?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityI just found one way to do it:
if has("gui_macvim")
" set macvim specific stuff
endif
has("gui_running")
will get you support for both macvim and gvim so will make your .vimrc more portable.
Mar 2, 2016 at 11:36
has("gui_macvim")
returns true if it is running as a GUI or on the commandline. However has("gui_running")
only seems to return true if MacVim is running as a GUI.