I set up tmux in WSL and I want to improve the integration between them.
How to select text in tmux inside of WSL and copy it to the Windows clipboard?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
~/.tmux.confand create it if it does not exist
set -g mouse on(if not, you will have to select the text with
create a key binding to copy the tmux buffer to the windows clipboard:
bind -n M-w run -b "tmux show-buffer | clip.exe"
With this key configuration, you can select text with the mouse and copy it(to the tmux buffer) using
w. (If you want to select something and don't want it to disappear, press
shift while letting the mouse button go.) After this, press
w again in order to copy the tmux buffer to the Windows clipboard.