Auto-edit if `still running` and no diffs #20

Closed
rking opened this Issue Feb 23, 2013 · 4 comments

Projects

None yet

2 participants

@rking
rking commented Feb 23, 2013

Hi, @chrisbra ! I'm still over here, happily using Recover.vim.

I did have one thing that I think would help me go faster:

If there is an "already running" vim editor, but its buffer is unmodified, then I certainly don't want a prompt: I just want to go into writeable mode on the file, and exit later. (That other vim can automatically reload the buffer on its own).

I haven't pawed through the code… how hard do you think this would be to implement as an optional behavior of Recover.vim? Thanks!

@chrisbra chrisbra added a commit that referenced this issue Feb 24, 2013
@chrisbra Fix issue #20
Allow to edit a file that is open in another Vim instance but unmodified
without further dialogs. This requires to set the configuration variable

    :let g:RecoverPlugin_Edit_Unmodified = 1
in your .vimrc

This is issue #20 suggested by ☈king, thanks!
39fb93c
@chrisbra
Owner

Hi ☈king!

On Sa, 23 Feb 2013, ☈king wrote:

Hi, @chrisbra ! I'm still over here, happily using Recover.vim.

I did have one thing that I think would help me go faster:

If there is an "already running" vim editor, but its buffer is unmodified, then I certainly don't want a prompt: I just want to go into writeable mode on the file, and exit later. (That other vim can automatically reload the buffer on its own).

I haven't pawed through the code… how hard do you think this would be to implement as an optional behavior of Recover.vim? Thanks!

Interesting suggestion. Check current head and make sure to set the
variable g:RecoverPlugin_Edit_Unmodified = 1 in your .vimrc

regards,

Christian

Vegetarier leben nicht länger, sie sehen nur älter aus.

@rking
rking commented Feb 25, 2013

@chrisbra - I don't want to speak too soon, but so far, it's gorgeous!!

This is the next level of swp handling.

I'm so impressed that you got it working so fast (and it looks like it was a non-trivial diff, too).

I'll test it on OS X when I get a chance (the README + Comments say Linux-only, but I'm interested to see how hard it would be to work for Mac people).

Thanks so much + will report more, later.

@rking
rking commented Mar 2, 2013

OK, this option is epic.

It has improved so many workflows for me (I like to pop in and pop out of editors, e.g. from a Ruby pry prompt with its edit -c command).

I vote that g:RecoverPlugin_Edit_Unmodified be the default.

I don't think anybody ever has wanted to stop what they were doing because some other vim already was looking at that file.

@chrisbra
Owner
chrisbra commented Mar 3, 2013

I am thinking about it.

@chrisbra chrisbra closed this May 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment