Map middle mouse to pastre from X11 PRIMARY buffer #518

Open
noscript opened this Issue Jan 23, 2014 · 2 comments

Projects

None yet

2 participants

@noscript

Can I map middle mouse button to traditional X11 behaviour in CtrlP prompt? That is pasting from VIM "* register.

I would expect it to work like this

let g:ctrlp_prompt_mappings = { 'PrtInsert("r*")': ['MiddleMouse'] }

but apparently I do it wrong

Owner
kien commented Jan 23, 2014

MiddleMouse is mapped to pasting from the clipboard register + by default. Not sure if I want to change it to *. See :h quoteplus and :h 'clipboard'.

That aside, PrtInsert() only accepts few certain arguments, not just any random string. And 'MiddleMouse' should be '<MiddleMouse>'.

But being able to specify the register there with PrtInsert() would be nice. I think I might add it.

Yeah, forgot about angle brackets :) It would be really great to be able to specify register. I know about <c-\> r * but that's like 3 commands instead of just a middle click.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment