tags:

views:

52

answers:

2

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?

A: 

You can simply make each desired name to be an alias which first renames .vimrc.configX into .vimrc before calling vim

DVK
Yes, I can tweak it that way, but then I'd need to keep a different file for each configuration, I'd like to have a single valid .vimrc file.
Jacobo de Vera
A: 

You are looking for the variable v:progname.

Neg_EV