Thursday, January 5, 2023

how to keep system clipboard in Vim register?

how to keep system clipboard in Vim register?



I setted up to copy from system clipboard with this in .vimrc

noremap <Leader>y "+y
noremap <Leader>p "+p


but that interferes with Vim inner registers.
when i yank, or delete something in vim, (like, i copy something from website, so i can put it in file via Vim), i need to delete current line and insert what i have in system clipboard.

but, when i delete something in vim, it stores that text in that same unnamed register. so, i need to go back to the app again, to copy what i want.
(or, to first delete in Vim, and then copy from site, and paste in Vim (facepalm))

How i can fix this?

When Vim replaces that register (unnamed), it is not placed in numbered registers at all ! which make my work harder ! it would be simple, as "1 to get that register which was pushed. but here, it gets replaced completely.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CADZsa2pnaN-K%3DKdfFZXaGacXXS9gEyf50pS7gAu3Yq__uUgfFA%40mail.gmail.com.

No comments: