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

Showing original recovery menu when pressing Ctrl-C #4

Closed lyokha closed 12 years ago

lyokha commented 12 years ago

Imagine that file is already edited in some vim's instance. When you mistakenly open same file in another vim's instance then Recover menu is shown, and it has only 2 variants: Show diffs or No. In this case pressing Yes can delete swap file (which is not good), pressing No will show read-only buffer. Original vim's recovery menu will show more possibilities: Open, Edit, Recover, Quit, Abort. In normal situation i would choose Q or A, but Recover won't propose those variants.

Fortunately pressing Ctrl-C in Recover menu will show up original menu but it is not known from Recover menu. Maybe it makes sense just to add into the Recover menu a line like

Press Ctrl-C to enter vim's recovery menu

to make people know that they can choose from all variants?

chrisbra commented 12 years ago

Hi lyokha!

On Mo, 26 Mär 2012, lyokha wrote:

Imagine that file is already edited in some vim's instance. When you mistakenly open same file in another vim's instance then Recover menu is shown, and it has only 2 variants: Show diffs or No. In this case pressing Yes can delete swap file (which is not good), pressing No will show read-only buffer. Original vim's recovery menu will show more possibilities: Open, Edit, Recover, Quit, Abort. In normal situation i would choose Q or A, but Recover won't propose those variants.

Fortunately pressing Ctrl-C in Recover menu will show up original menu but it is not known from Recover menu. Maybe it makes sense just to add into the Recover menu a line like

Press Ctrl-C to enter vim's recovery menu

to make people know that they can choose from all variants?

Please try current head.

Liebe Grüße

Christian

Politik bedeutet Steuern zu erheben, die man selbst nicht zahlt.

lyokha commented 12 years ago

Yes, looks good! But now there is another issue: When i enter :FinishRecovery then there are error messages (i translated them from Russian):

Error when processing recover#RecoverFinish: line 5: E121: Not defined variable b:swapname E116: Pqrqmeters for function delete are wrong

chrisbra commented 12 years ago

On Tue, March 27, 2012 10:23, lyokha wrote:

Yes, looks good! But now there is another issue: When i enter :FinishRecovery then there are error messages (i translated them from Russian):

Error when processing recover#RecoverFinish: line 5: E121: Not defined variable b:swapname E116: Pqrqmeters for function delete are wrong

yes true. Fixing this locally and push it later.

regards, Christian

lyokha commented 12 years ago

Hi Christian.

I still have issue with undefined b:swapname after update to 0.13

Regards, Alexey.

2012/3/27 chrisbra < reply@reply.github.com

On Tue, March 27, 2012 10:23, lyokha wrote:

Yes, looks good! But now there is another issue: When i enter :FinishRecovery then there are error messages (i translated them from Russian):

Error when processing recover#RecoverFinish: line 5: E121: Not defined variable b:swapname E116: Pqrqmeters for function delete are wrong

yes true. Fixing this locally and push it later.

regards, Christian


Reply to this email directly or view it on GitHub: https://github.com/chrisbra/Recover.vim/issues/4#issuecomment-4712040

chrisbra commented 12 years ago

On Fri, March 30, 2012 08:56, lyokha wrote:

Hi Christian.

I still have issue with undefined b:swapname after update to 0.13

please try current head.

regards, Christian

lyokha commented 12 years ago

Ok, i'll try now, but i found that simple commenting of line 'bd!' in recover#RecoverFinish() fixes this. Looks like after bd! b:swapname and command FinishRecovery itself get undefined.

2012/3/30 chrisbra < reply@reply.github.com

On Fri, March 30, 2012 08:56, lyokha wrote:

Hi Christian.

I still have issue with undefined b:swapname after update to 0.13

please try current head.

regards, Christian


Reply to this email directly or view it on GitHub: https://github.com/chrisbra/Recover.vim/issues/4#issuecomment-4837607

lyokha commented 12 years ago

Now it works!

2012/3/30 Alexey Radkov alexey.radkov@gmail.com

Ok, i'll try now, but i found that simple commenting of line 'bd!' in recover#RecoverFinish() fixes this. Looks like after bd! b:swapname and command FinishRecovery itself get undefined.

2012/3/30 chrisbra < reply@reply.github.com

On Fri, March 30, 2012 08:56, lyokha wrote:

Hi Christian.

I still have issue with undefined b:swapname after update to 0.13

please try current head.

regards, Christian


Reply to this email directly or view it on GitHub: https://github.com/chrisbra/Recover.vim/issues/4#issuecomment-4837607