Tuesday, February 1, 2011

Re: Help, please

On Sat, 29 Jan 2011, Ed Bradford wrote:

> I use DropBox. I edit a file on computer "A" and FORGET to exit vim.
> Now on computer "B", the .swp file prevents me from editing. I know I
> can ignore and just to go computer. However, VIM and DropBox could
> solve my problem by having an option to update on 1,4,16,64,256 second
> intervals and abandoning the lock file that is the .swp file. DropBox
> has solved the SYNC problem. Please embrace it and make DropBox and
> VIM work as people WANT, not as developer's expect.

I guess I didn't read the initial problem closely enough...

Another possible option is to 'kill' the running Vim process on computer
A. For example, I work on things on my work computer from both home and
work. If I leave a file open in Vim while at work, and go to edit it
when I'm home, I get the recovery message.

Often I won't have made any changes since the time I last saved, in
which case it's perfectly fine to 'kill' the running Vim.

E.g.:

work$ vi ~/some.file
[leave running]

[later, at home]
home$ ssh work
work$ vi ~/some.file
E325: ATTENTION
Found a swap file [...]
...
modified: no
...
process ID: 10287 (still running)
(choose 'A' for (A)bort)
work$ kill 10287 # just 'kill' (which defaults to 'kill -TERM'), not 'kill -9'
[running vim is safely shut down]
work$ vi ~/some.file
[edit as normal]

--
Best,
Ben

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment