轉載自:http://blog.csdn.net/yangzhongxuan/article/details/6890232linux
以前tmux的複製模式沒有學會,網上文檔有不多,因此試了不少次,終於能複製了。vim
設置複製模式中的默認鍵盤佈局;能夠設置爲vi或emacs,我是把這個設置寫入了配置文件。
set-window-option -g mode-keys vi #能夠設置爲vi或emacs
set-window-option -g utf8 on #開啓窗口的UTF-8支持
tmux複製模式的命令表:
Function vi emacs
Back to indentation ^ M-m
Clear selection Escape C-g
Copy selection Enter M-w
Cursor down j Down
Cursor left h Left
Cursor right l Right
Cursor to bottom line L
Cursor to middle line M M-r
Cursor to top line H M-R
Cursor up k Up
Delete entire line d C-u
Delete to end of line D C-k
End of line $ C-e
Goto line : g
Half page down C-d M-Down
Half page up C-u M-Up
Next page C-f Page down
Next word w M-f
Paste buffer p C-y
Previous page C-b Page up
Previous word b M-b
Quit mode q Escape
Scroll down C-Down or J C-Down
Scroll up C-Up or K C-Up
Search again n n
Search backward ? C-r
Search forward / C-s
Start of line 0 C-a
Start selection Space C-Space
Transpose chars C-t
複製模式步驟:
個人控制鍵爲:C-b
一、 C-b [ 進入複製模式
二、 參考上表移動鼠標到要複製的區域,移動鼠標時可用vim的搜索功能"/","?"
三、 安空格鍵開始選擇複製區域
四、 選擇完成後安enter鍵退出
五、 C-b ] 粘貼
linux 終端下能夠用 man tmux 查看更詳細的說明。