3 ms·
I know it's possible, but I honestly don't know how to copy between instances of vi without it. This has been a huge convenience for me and I'm glad they are k
by dhimes 13y ago
I know it's possible, but I honestly don't know how to copy between instances of vi without it. This has been a huge convenience for me and I'm glad they are keeping it.
- kps 13y agoIf you are using vim and it is built appropriately, the "* register reflects the contents of the primary selection and the "+ register the contents of the clipboard. See :help registers
- dhimes 13y agoAh, yes, I see that does work. I probably tried on a version that wasn't compiled with that- found middle-click and never looked back. Thanks though for getting me to check again.
- mugiwara 13y agoYou can also use the default register instead of "+ :set clipboard=unnamed http://vim.wikia.com/wiki/Accessing_the_system_clipboard http://vim.wikia.com/wiki/Accessing_the_system_clipboard
- roberto 13y agoI have these lines in my .Xresources file (which is sourced by .xinitrc with `xrdb -merge "${HOME}/.Xresources"`): Shift<Key>Insert: insert-selection(CLIPBOARD) \n\ <Key>Insert: insert-selection(PRIMARY) \n\ Shift<Btn2Up>: insert-selection(CLIPBOARD) \n\ Shift<Btn1Down>: select-start() \n\ Shift<Btn1Motion>: select-extend() \n\ Shift<Btn1Up>: select-end(CLIPBOARD) This way, if I select something with the mouse while pressing shift it will go to the clipboard. I can shift-select text on the terminal and paste to Firefox using ctrl-V, for example. And I can copy something from Firefox using ctrl-C and paste it on vim using shift-insert. Normal selection goes to the other clipboard, so I can paste it using middle button or just clicking insert.