On 06/10/12 13:01, Christian Brabandt wrote:
> Hi Paul!
> On Sa, 06 Okt 2012, Paul wrote:
>> In .vimrc, how can I detect whether vim was invoked as 'view'? Looking
>> for &readonly also matched when doing :help from within 'vim', which I
>> don't want, eg:
> :h v:progname
> Mit freundlichen Gr en
You (Paul) may want to test against a regaxp, e.g.
if v:progname =~ 'view'
in order to catch gview, rview, or "view with any additional trailing
characters" (which Vim will treat as invoking it as view).
LAUNCELOT: I am, sir. I am a Knight of King Arthur.
FATHER: 'Mm ... very nice castle, Camelot ... very good pig country....
"Monty Python and the Holy Grail" PYTHON (MONTY)