On 2007-04-19, [EMAIL PROTECTED] wrote:
>  This is a wish question about swap file management on startup, I am running
> 
>  VIM - Vi IMproved 7.0 (2006 May 7, compiled Oct 10 2006 00:48:23)
>  Included patches: 1-122
>  Compiled by [EMAIL PROTECTED]
> 
>  and I wanted to know if there is a command line option for selecting the
>  delete/read-only/quit/etc/ swap file options.
> 
>  If there is not, is there any plan to add a feature like this? If so
>  where would you add it? Into the vim program or as a script which is
>  sourced before opening any files?
> 
>  It would be very useful, I find.

Take a look at 

    :help SwapExists

Yegappan Lakshmanan's posted the following example to the vim-dev 
list 2007-03-06 which allows a file to be opened in read-only mode 
when jumped to from a vim instance in which 'noreadonly' is set, as 
when jumping to a tag.  

    autocmd SwapExists * if v:swapcommand =~ '^:ta\%[g] ' | let 
v:swapchoice='o' | endif

That's not a direct answer to your question, but it may give you the 
tools you need to craft a solution.

HTH,
Gary

-- 
Gary Johnson                 | Agilent Technologies
[EMAIL PROTECTED]     | Mobile Broadband Division
                             | Spokane, Washington, USA

Reply via email to