Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to copy from tmux running in putty to windows clipboard

Tags:

vim

tmux

ENV: I am running tmux in putty, on a windows 7 laptop. I do ssh to linux systems while working.

I have to solve two glitches with tmux, before using it for all my needs.

  1. I have to copy some text to the windows notepad from vim or the tmux terminal. I have enabled mouse support for both vim and putty.

    I have tried "*y and "+y but both of them doesn't work. If I use putty's ability for copy then it copies the content of adjacent grids also.

  2. I have to copy some content from vim file in one pane to vim file opened in another pane. Is there any vim trick for this. I don't want to use <C-b>[ way of doing it.

Problem 1 is haunting me more, because there is a w/a for problem 2.

like image 409
Vivek Jha Avatar asked Jun 22 '13 20:06

Vivek Jha


People also ask

How do I copy from tmux to clipboard?

If you use tmux's copy mode keyboard commands to select some text and then click Ctrl + c or y it'll copy it into the system clipboard. y is the key that tmux-yank uses for copying to the clipboard, the same as vim's “yank” key (which ironically doesn't use the system clipboard by default in vim).

How do I copy text from a tmux session?

Use the 'Ctrl+spacebar' to start copying. Step 3. Move with the arrow keys to the position of the text you want to copy to. When you have finished selecting the text, press 'Alt+w' or 'Ctrl+w' to copy the text to a Tmux Buffer.

How do I copy and paste in PuTTY VI?

To copy from Windows and paste into PuTTY, highlight the text in Windows, press " Ctrl-C ," select the PuTTY window, and press the right mouse button to paste. To copy from PuTTy and paste into Windows, highlight the information in PuTTY and press " Ctrl-V " in the Windows application to paste it.


1 Answers

I use putty v0.62 and tmux v1.8.

tmux config: setw -g mode-mouse on

I want to copy some text from tmux to system clipboard, I press and hold SHIFT and select the text by mouse, then click left-button of mouse.

I want to paste some text into tmux, press SHIFT and click right-button of mouse.

like image 159
lslab Avatar answered Sep 19 '22 14:09

lslab