maxbrunsfeld / vim-yankstack

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

Problem with 'p' mapping #15

Closed mMontu closed 12 years ago

mMontu commented 12 years ago

The problem happens when the count on normal p is greater than the number of lines on the buffer.

1 - open a new buffer and type aabc<esc> 2 - yy2p

Instead of pasting "abc" the 2p command fails complaining about "invalid range". It seems that for some reason the count is used as a range to all <SNR>3_paste_with_key("p", "n", .... One solution may be include<C-u> (:<C-u>call <SNR>3_paste_with_key("p", "n", ...), similar to :vmap p. But it seems that adding <C-u> alone removes the count, so 2p perform a single paste.