Enable Tmux Copy&Paste in VS Code Terminal for Mac

Xu LIANG
1 min readFeb 18, 2019

--

Word through how to enable Copy&Paste in VS Code Terminal with Tmux for Mac

Problem

TMux: Copy and paste commands not working on Mac OS

Solution

Make sure you already download reattach-to-user-namespace

brew install reattach-to-user-namespace

Add below command in .tmux.conf

# Make sure mouse mode is enabled
set -g mouse on
# Required by MacOS Sierra and Sierra High.
set -g default-command "reattach-to-user-namespace -l $SHELL"

Finally, add bellow option to settings.json in VS Code

"terminal.integrated.macOptionClickForcesSelection": true,

Check out my other posts on Medium with a categorized view!
GitHub:
BrambleXu
LinkedIn:
Xu Liang
Blog:
BrambleXu

Reference

  1. Unable to Copy and Paste #44655
  2. TMux: Copy and paste commands not working on Mac OS #24112
  3. Alt key should force selection #816
  4. User and Workspace Settings

--

--

Xu LIANG

I’m an engineer focusing on NLP and Data Science. I write stuff to repay the engineer community. You can find me on linkedin.com/in/xu-liang-99356891/