Re: Copy from Firefox and paste into Terminal with Vim
On 06/02/2024 06:14, David Christensen wrote:
Enter a Zip Code of "12345", highlight the first result, copy it to the
clipboard,
[...]> But if I close the above Firefox window, start a Firefox instance,
browse to:
If you terminate an application handling selection then content is not
available any more. To make selection "persistent", you may try some
clipboard manager, but it may have not always desirable side effects.
To debug you may use xsel or xclip
xclip -o -selection PRIMARY
xclip -o -selection CLIPBOARD
To access primary selection or clipboard in vim use * and + registers:
"*p in normal mode or C-R* in insert mode. It is safer than middle click
or [Ctrl+Shift+V] handled by terminal since selection may contain
terminal control characters (e.g. to exit from vim and to run rm -rf ~
in terminal).
Reply to: