Tuesday, September 7, 2010

Re: disable file locks ?

On 2010-09-07, Aaron Lewis wrote:
> Hi,
> Is it possible to disable file locks on command ?
>
> I'm suffering from a KDE service menu , using `konsole -e vim %f` to
> edit a file ,
> and when konsole is closed , vim is kinda closed unexpected , thus
> file being edited is still locked.
>
> So if i could pass a parameter , that vim won't create file locks.
>
> Many thanks.

Vim doesn't lock files. Why do you think Vim locks files?

You might be seeing the effect of a Vim swap file that was left when
Vim was terminated. That is a feature. It allows you to recover a
file that was being edited when Vim terminated unexpectedly. You
can prevent Vim from creating swap files, but that would be a bad
idea. The swap file not only allows Vim to recover from crashes but
also allows Vim to warn you when you attempt to edit the same file
in two instances of Vim.

The solution in your case would be to close Vim instead of closing
Konsole when you're through editing the file.

Regards,
Gary

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