I would like to paste some URLs (text) into scripts, and to do so it would be most convenient if I could copy and paste from the browser to a xterm instance of vi.

How can I copy (control-C) and then paste the string copied, into an instance of vi?

I am using Slackware 14.2, with KDE.


Copy the string as normal. Open up vi in xterm. Then change to paste mode by typing :set paste and then use Shift+Insert to paste the string. Paste mode avoids unexpected effects that might be present when pasting using insert mode.


I usually copy from the browser, then I go ti vi, set it into 'insert' then right-click to paste.

(I'm talking of vi running into a terminal-emulator window, not on a plain TTY)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.