chrisbra / Recover.vim

A Plugin to show a diff, whenever recovering a buffer
http://www.vim.org/scripts/script.php?script_id=3068
247 stars 25 forks source link

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

Closed rking closed 11 years ago

rking commented 11 years ago

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 commented 11 years ago

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 commented 11 years ago

@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 commented 11 years ago

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 commented 11 years ago

I am thinking about it.