Hi Tony :)
* A.J.Mechelynck <[EMAIL PROTECTED]> dixit:
> DervishD wrote:
> > The problem is that I would like to use vim with other
> >"personalities" (different sets of options) depending on its
> >invocation name. Can this be done? I haven't found in the
> >documentation any function to retrieve the full command line, just
> >the file argument list.
> >
> > Any suggestion about how to discriminate in the .vimrc file
> >depending on the invocation name for vim?
> >
>
> :help v:progname
S*IT! I tried argc, argv, etc. but I didn't tried the simplest form:
progname. Thanks a lot!
> Note that sometimes Vim will get a progname with suffixes, e.g. gvimd
> for a version of gvim compiled with debug information; or vim64.exe
> for a Vim 6.4 kept for testing scripts. So in general I would
> recommend testing using pattern-matching:
I'm going to use it just under my login, it won't be installed as a
system-wide mechanism, but I take this into acount if I ever install it
as a global rc.
> if v:progname =~? 'vim' " test for vim or gvim
> if v:progname =~? '^r' " restricted mode
> don't test for "if v:progname ~? 'view'", test for "if &readonly"
That's how I do it right now, but I don't want to use the
alternative configuration just because &readonly is set, I want to use
based on the invocation name, at least for my system.
Thanks a lot for your help :)))
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!