Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Detecting 'view'
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Paul  
View profile  
 More options Oct 6 2012, 6:48 am
From: Paul <google1...@rainslide.net>
Date: Sat, 6 Oct 2012 11:47:41 +0100
Local: Sat, Oct 6 2012 6:47 am
Subject: Detecting 'view'
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:

if &readonly
     " Things that should only happen when called as 'view'
endif

--

.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Brabandt  
View profile  
 More options Oct 6 2012, 7:01 am
From: Christian Brabandt <cbli...@256bit.org>
Date: Sat, 6 Oct 2012 13:01:17 +0200
Local: Sat, Oct 6 2012 7:01 am
Subject: Re: Detecting 'view'
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
Christian
--
Seit die Mathematiker ber die Relativit tstheorie hergefallen sind,
verstehe ich sie selbst nicht mehr.
                -- Albert Einstein


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Mechelynck  
View profile  
 More options Oct 7 2012, 3:27 am
From: Tony Mechelynck <antoine.mechely...@gmail.com>
Date: Sun, 07 Oct 2012 09:27:29 +0200
Local: Sun, Oct 7 2012 3:27 am
Subject: Re: Detecting 'view'
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
> Christian

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).

Best regards,
Tony.
--
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)
PICTURES LTD


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul  
View profile  
 More options Oct 8 2012, 6:52 am
From: Paul <google1...@rainslide.net>
Date: Mon, 8 Oct 2012 11:52:21 +0100
Local: Mon, Oct 8 2012 6:52 am
Subject: Re: Detecting 'view'
Excellent! Thanks, Christian and Tony.

--

.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »