maxbrunsfeld / vim-yankstack

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

Registered yanks not cycling #3

Closed davejacobs closed 12 years ago

davejacobs commented 12 years ago

I haven't been able to get yankstack to cycle through registered yanks. Looks like everything is set up properly. This is what I've been doing to test:

  1. Type:

    First line Second line Third line

  2. Go to first line
  3. Copy first, second and third lines with yy
  4. Inspect :Yanks output to make sure that all's well
  5. Paste the third line onto the fourth line using p
  6. Attempt to cycle backwards using <M-p>

On my machine, I can't get the cycling to work. (<M-p> looks like a no-op.)

Here's some debugging output:

:Yanks:

0 Third line 1 Second line 2 First line

map <M-p>:

yankstack_substitute_older_paste When I enter insert mode then escape and hit ``, I get the right message: "Last change was not a paste." Any idea what's going on? (I cloned the HEAD of master yesterday.) Thanks!
maxbrunsfeld commented 12 years ago

Ok, so yanks are getting pushed onto the stack correctly, and meta-p is doing something. Maybe the p key isn't getting remapped properly?

When you run map p, you should see <Plug>yankstack_p, and map P should be <Plug>yankstack_P. These mappings store some information that needed by yankstack before calling through to the normal paste keys. But also, you should still be able to remap p and P, as long as you call yankstack#setup() first.

Maybe sometime at work I could try it on your machine. I haven't really tested yankstack with too many different setups yet. Thanks for trying it!

davejacobs commented 12 years ago

Per our coffee shop debugging session, removing set clipboard=unnamed makes everything smooth as buttah. Sweet.

maxbrunsfeld commented 12 years ago

Adding an issue for compatibility with clipboard=unnamed