2025-10-23
Use tmux save-buffer to sync clipboard
2025-10-23 ~ 2026-01-01

The note is generated by ChatGPT.

This note explains how to:

  1. Synchronize text copied in a remote Neovim session with your local clipboard via tmux.
  2. Implement a cpwd command to copy the current working directory of your shell to the local clipboard.
  3. Understand the underlying principle of how tmux buffers bridge remote Neovim and local clipboard.

1. Prerequisites

  • tmux 3.3a+ (supports load-buffer -w)
  • Neovim installed on the remote server

2. Principle: How tmux Buffers Bridge Remote and Local Clipboard

  1. tmux Buffers as an Intermediate Clipboard

2025-08-25
TMUX常用命令
2025-08-25 ~ 2025-08-25
  1. 面板分割
    • 垂直分割窗口(左右分屏):
      按 Ctrl+b 后松开,再按 %(百分号)
    • 水平分割窗口(上下分屏):
      按 Ctrl+b 后松开,再按 "(双引号)