DEV Community

HaxNet
HaxNet

Posted on

Copy & Paste from Vim to External

I was trying to copy and paste something from Vim to the browser and I honestly forgot how to do it because it's been awhile since I had to do it and also I reinstalled my Arch Linux so I gave up on the xclip and the special commands to copy.

My quick solution: open a new terminal and

cat .thefilename

then copy directly from the terminal and do your simple paste to your external app.

Just a quick tip

Top comments (3)

Collapse
 
hpathiraja profile image
hpathiraja

set clipboard=unnamed should sync your vim clipboard with the system clipboard.

Collapse
 
haxnet profile image
HaxNet • Edited

I tried that before but it didn't seem to work for me. I'll try it again. Thanks

Update: doesn't work.

Collapse
 
haxnet profile image
HaxNet

I don't use macOS anymore, but good to know if I ever come across again when I need to use Vim on it.