On Mon, Sep 21, 2009 at 10:54 AM, Tim Chase <[email protected]> wrote:
>
>> project tree). When this is the case, some files will be opened by DirDiff
>> in another vim, but it will report that files are opened by the first vim
>> instance and ask me for a confirm.  So I am thinking, in the later vim
>> instance, if I can however tell vim that all the further opened file will be
>> automatically read-only, that will save my life.
>>
>> Can I do this in vim?  Thanks.
>
> Of course :)
>
>   :autocmd SwapExists * let v:swapchoice='o'
>
> You can read more about other options at
>
>   :help SwapExists

Why not just open the 2nd vim instance used for diff using the -R
option? I think this opens all files in readonly mode, so should not
cause the swap error.

-- 
HTH,
Hari

>
> -tim
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to