maxbrunsfeld / vim-yankstack

A lightweight implementation of emacs's kill-ring for vim
437 stars 29 forks source link

snipMate interference #7

Closed mMontu closed 12 years ago

mMontu commented 12 years ago

It seems that snipMate (http://www.vim.org/scripts/script.php?script_id=2540) is somehow corrupting yankstack registers.

To reproduce the problem:

1-) :e temp.c 2-) type: line1 line2 line3 3-) copy each line with yy 4-) :Yanks displays:

  --- Yanks ---
  0         line3
  1         line2
  2         line1

5-) expand some snipppet that contains an identifier to replace, such as 'inc' and type anything to replace the text that appears selected

include

6-) :Yanks displays:

  --- Yanks ---
  0   stdio
  1   line2   --> line3 disappeared
  2   line1
maxbrunsfeld commented 12 years ago

@mMontu, this has bitten me a couple of times too. It's not immediately obvious to me how to fix this, but I have a couple of ideas. I'm going to spend some time on it soon, after I set up a unit-testing scheme for yankstack.

mMontu commented 12 years ago

ok, please let me know if I can help or perform any additional test.

maxbrunsfeld commented 12 years ago

Hey @mMontu, just wanted to say this is still going to get fixed. It annoyed me again today at work.

mMontu commented 12 years ago

Thanks for the update! (I'm happy that today it is holiday here!) :)

maxbrunsfeld commented 12 years ago

This bug is fixed as of the latest master. Let me know how it works for you. Thanks!

mMontu commented 12 years ago

I've tested and everything seems to works fine! :D

mMontu commented 12 years ago

Hi @maxbrunsfeld! It seems that in some cases the snipMate still corrupts the Yanks list. Following the reproduction steps above, typing <alt-p> after 'inc' didn't bring "line 3", but instead makes it disappear from the Yanks list. It seems to replace it with the selected text.