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

delete SwapBRP autocommand group #22

Closed coot closed 11 years ago

coot commented 11 years ago

When SwapBRP is left one cannot recover subsequent swap files.

chrisbra commented 11 years ago

I don't think this is correct. This would delete the autocommand group even when it just was defined. What problem is this trying to solve?

coot commented 11 years ago

Hi,

Let say that you have to files file_1 file_2

and there both of them have left swap files (in my case the swap and the file had the same content). Now when vim ask to diff them it just shows that they are the same, removes the swp file and changes the current swap file (swo) to swp. However, when I recover the second file, after I hit i to diff them it does not recognize that the files are identical, and does not ask to remove the old (.swp) file. The reason is that the SwapBRP autocommand is not removed.

Your right that it is not the right place where I delete the autocommand. What about adding it to s:CheckRecover(). See my commit here: https://github.com/coot/Recover.vim/commit/8aa3fcf39396c782e4eaa677069df463bc8f7e8a

Best regards, Marcin

On 11:49 Sun 12 May , chrisbra wrote:

I don't think this is correct. This would delete the autocommand group even when it just was defined. What problem is this trying to solve?


Reply to this email directly or view it on GitHub: https://github.com/chrisbra/Recover.vim/pull/22#issuecomment-17783003

chrisbra commented 11 years ago

Looks good. I include it.

Thanks for contributing.

coot commented 11 years ago

Thanks, this was my pleasure :)

Marcin

On 04:39 Tue 14 May , chrisbra wrote:

Looks good. I include it.

Thanks for contributing.


Reply to this email directly or view it on GitHub: https://github.com/chrisbra/Recover.vim/pull/22#issuecomment-17870687