I'm trying to insert the commands
Copy Command History to clipboard q::%y
Copy Search History to clipboard q/:%y
in a vimscript doing this:
:normal q::%y
:normal q/:%y
but it doesn't copy anything
Why?
(It works fine when I do it manually (q::%y
q/:%y
))
This worked for me:
nnoremap <Leader>r q::%y<cr>
and to close the window after:
nnoremap <Leader>r q::%y<cr>:q<cr>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With