0

I have a binding like this to paste above or below:

nmap bp o<ESC>p
nmap ap O<ESC>p

However its limited to paste from default register. Is it possible to make this work with any register? Like say ":bp or "+bp etc ? Basically I want to prepend o<ESC> to my next action.

This is a duplicate of Vim - mapping with an optional register prefix.

Community
  • 1
  • 1
Nishant
  • 20,354
  • 18
  • 69
  • 101
  • 1
    Don't put comments after the mappings (as they aren't comments). – FDinoff Dec 26 '14 at 20:45
  • Also for this example... `P` does paste above. So no mapping needed. – FDinoff Dec 26 '14 at 20:46
  • p and P actually pastes above and below , but only if it has line ending right? I often small segments of text but need to dump into the next line in vim. Also sometimes paste the last used command etc. – Nishant Dec 26 '14 at 20:47

0 Answers0