[关闭]
@nemos 2017-05-06T03:17:45.000000Z 字数 1644 阅读 822

Tmux

tools


安装

  1. # ubuntu环境
  2. sudo add-apt-repository ppa:pi-rho/dev
  3. sudo apt-get update
  4. sudo apt-get install tmux-next=2.3~20161124~bzr3624+20-1ubuntu1~ppa0~ubuntu16.04.1
  5. tmux-next -V
  6. sudo ln -s /usr/bin/tmux-next /usr/bin/tmux

默认配置

快速使用

默认的<<prefix>><Ctrl+b>

  1. tmux new -s basic #开启新会话
  2. tmux ls #查看会话
  3. tmux a -t sesname #回到会话
  4. tmux kill-session -t #关闭会话
  5. <prefix> + d #退出当前会话

详细说明

session

快捷键 操作
<prefix> + s 查看/切换Session
<prefix> + d 离开Session
<prefix> + $ 重命名当前Session

window

快捷键 操作
<prefix> + c 创建Window
<prefix> + & 关闭Window
<prefix> + n 切换到下一个Window
<prefix> + p 切换到上一个Window
<prefix> + Window号 切换Window号
<prefix> + w 查看/切换Window

panel

快捷键 操作
<prefix> + x 关闭pane
<prefix> + % 垂直拆分
<prefix> + " 水平拆分
<prefix> + q 显示Pane编号
<prefix> + o 切换到下一个Pane
<prefix> + z 切换Pane的全屏
<prefix> Alt + 方向 调整Pane的大小

配置文件

配置文件

快速使用

C-a<prefix>

  1. <prefix> + hjkl # 切换panel
  2. <prefix> + HJKL # 拉伸panel
  3. <prefix> + C + hjkl # 切换window
  4. <prefix> + C + hjkl

详细说明

  1. <prefix> C-c creates a new session
  2. <prefix> e opens ~/.tmux.conf.local with the editor defined by the $EDITOR environment variable (defaults to vim when empty)
  3. <prefix> r reloads the configuration
  4. <prefix> C-f lets you switch to another session by name
  5. <prefix> C-h and <prefix> C-l let you navigate windows (default <prefix> n and <prefix> p are unbound)
  6. <prefix> Tab brings you to the last active window
  7. <prefix> h, <prefix> j, <prefix> k and <prefix> l let you navigate panes ala Vim
  8. <prefix> H, <prefix> J, <prefix> K, <prefix> L let you resize panes
  9. <prefix> < and <prefix> > let you swap panes
  10. <prefix> + maximizes the current pane to a new window
  11. <prefix> m toggles mouse mode on or off
  12. <prefix> U launches Urlview (if available)
  13. <prefix> F launches Facebook PathPicker (if available)
  14. <prefix> Enter enters copy-mode
  15. <prefix> b lists the paste-buffers
  16. <prefix> p pastes from the top paste-buffer
  17. <prefix> P lets you choose the paste-buffer to paste from
  18. C-l clears both the screen and the history

参考

我的tmux基础教程果然坑爹了
键位报错解决方案


添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注