How can I specify a different configuration for Vim based on the executable name?

Posted by Jacobo de Vera on Stack Overflow See other posts from Stack Overflow or by Jacobo de Vera
Published on 2010-03-15T16:34:38Z Indexed on 2010/03/15 17:39 UTC
Read the original article Hit count: 275

Filed under:

I am trying to open Vim with different configuration options depending on the executable file name. I intend to create a number of symbolic links to vim and I'd like to do something like this in my .vimrc

if execname == "vim2"
   " configuration here
endif

Is there a variable in Vim that holds the name of the executable file being run? Alternatively, is there another way I can have different configurations without having to keep more than one .vimrc file?

© Stack Overflow or respective owner

Related posts about vim