When I use "+y to copy to the system clipboard, the selected content is copied to the + register as well as the default(") register. How can I ensure that the content is copied only to the + register without modifying the " register?
EDIT: I now understand that this is the intended behavior and any yanking will modify the default register. I still want to know whether there's a workaround for this.
I have come with a naive solution
for visual mode
vnoremap <Leader>y :<C-u>let @+=@*<CR>
and for single line in
nnoremap <Leader>yy :<C-u>let @+=getline('.') . "\n"<CR>
But we will be missing many yank features. I hope someone provides a better solution.