Cheatsheet: tmux,
参考

  • https://www.outcoldman.com/cheatsheets/tmux/
  • https://gist.github.com/noku/ceb09028b815034e41c1

Command line

tmux new -s {session_name} -n {name} - create new session and specify window name
tmux {attach|a|at} -t {session_name} - attach to session
tmux ls - list sessions
tmux kill-session -t {session_name} - kill session

Misc

Prefix ? - help
Prefix d - detach
Prefix t - big clock

Command mode

Prefix : - command mode
new-window -n {name} {command} - create new window and execute command

Sessions

:new - new session
Prefix s - list sessions
Prefix $ - name session
Prefix ( - previous session
Prefix ) - next session
Prefix L - last session

Windows

Prefix c - create new window
Prefix , - rename window
Prefix n - next window
Prefix p - previous window
Prefix {n} - go to window n
Prefix f - find window by name
Prefix w - list windows
Prefix & - kill window

Panes

Prefix % split panes by vertical (see tmux-pain-control)
Prefix " split panes by horizontal (see tmux-pain-control)
Prefix o - cycle through the panes
Prefix {arrow key} - navigate to specific pane (see tmux-pain-control)
Prefix space - cycle thought layouts
Prefix x - close pane
Prefix q - show panes numbers
Prefix z - switch to whole window mode and back
Prefix { - move the current pane left (see tmux-pain-control)
Prefix } - move the current pane right (see tmux-pain-control)
:setw synchronize-panes - toggle panes synchronization

Copy mode (vi mode)

Prefix [ - start copy mode
Prefix ] - past from copy mode
^ - back to indentation
esc - clear selection
enter - copy selection
j - cursor down
h - cursor left
l - cursor right
k - cursor down
L - cursor to bottom line
M - cursor to middle line
H - cursor to top line
d - delete entire line
D - delete to end of line
$ - end of line
: - goto line
⌃-d - half page down
⌃-u - half page up
⌃-f - next page
w - next word
p - paste buffer
⌃-b - previous page
b - previous word
q - quit mode
⌃-down, ⌃-j - scroll down
⌃-up, ⌃-k - scroll up
n - next search match
? - search backward
/ - search forward
0 - start of line
space - start selection

使用vi的方式在copy mode移动

将设置setw -g mode-keys vi在配置文件~/.tmux.conf写上
然后tmux source ~/.tmux.conf
使用命令如下

Function                vi             emacsBack to indentation     ^              M-mClear selection         Escape         C-gCopy selection          Enter          M-wCursor down             j              DownCursor left             h              LeftCursor right            l              RightCursor to bottom line   LCursor to middle line   M              M-rCursor to top line      H              M-RCursor up               k              UpDelete entire line      d              C-uDelete to end of line   D              C-kEnd of line             $              C-eGoto line               :              gHalf page down          C-d            M-DownHalf page up            C-u            M-UpNext page               C-f            Page downNext word               w              M-fPaste buffer            p              C-yPrevious page           C-b            Page upPrevious word           b              M-bQuit mode               q              EscapeScroll down             C-Down or J    C-DownScroll up               C-Up or K      C-UpSearch again            n              nSearch backward         ?              C-rSearch forward          /              C-sStart of line           0              C-aStart selection         Space          C-SpaceTranspose chars                        C-t

Settings

set -g mode-mouse on - enable mouse support

Plugins

tmux-copycat

https://github.com/tmux-plugins/tmux-copycat

prefix + / - regex search (strings work too)
Predefined searches
prefix + ctrl-f - simple file search
prefix + ctrl-g - jumping over git status files (best used after git status command)
prefix + alt-h - jumping over SHA-1 hashes (best used after git log command)
prefix + ctrl-u - url search (http, ftp and git urls)
prefix + ctrl-d - number search (mnemonic d, as digit)
prefix + alt-i - ip address search

tmux-open

https://github.com/tmux-plugins/tmux-open

o - “open” a highlighted selection with the system default program. open for OS X or xdg-open for Linux.
⌃-o - open a highlighted selection with the $EDITOR

tmux-pain-control

https://github.com/tmux-plugins/tmux-pain-control

Navigation

Prefix + h, Prefix + C-h - select pane on the left
Prefix + j, Prefix + C-j - select pane below the current one
Prefix + k, Prefix + C-k - select pane above
Prefix + l, Prefix + C-l - select pane on the right

Resizing

Prefix + shift + h - resize current pane 5 cells to the left
Prefix + shift + j - resize 5 cells in the up direction
Prefix + shift + k - resize 5 cells in the down direction
Prefix + shift + l - resize 5 cells to the right

Splitting

Prefix | split panes by vertical
Prefix - split panes by horizontal

Swapping panes

Prefix < moves current pane one position to the left
Prefix > moves current pane one position to the right

tmux-resurrect

https://github.com/tmux-plugins/tmux-resurrect

Prefix ⌃-s - save
Prefix ⌃-r - restore

tmux-yank

https://github.com/tmux-plugins/tmux-yank

Prefix - y - copies text from the command line to clipboard
**copy mode**
y - copy selection to system clipboard
Y - copy selection and paste it to the command line

vim-tmux-navigator

https://github.com/christoomey/vim-tmux-navigator

⌃-h - Left
⌃-j - Down
⌃-k - Up
⌃-l - Right
⌃-\ - Previous split

tmuxinator

https://github.com/tmuxinator/tmuxinator

tmux-sensible

https://github.com/tmux-plugins/tmux-sensible

tpm

https://github.com/tmux-plugins/tpm

tmux | 使用手册 (cheat sheet)相关推荐

  1. Tmux Cheat Sheet

    Tmux Cheat Sheet 文章目录 Tmux Cheat Sheet 1. Sessions 2. Windows(个人不常用) 3. Panes 4. Tips 5. 配置文件:`.tmux ...

  2. 容器编排技术 -- kubectl Cheat Sheet

    容器编排技术 -- kubectl Cheat Sheet 1 Kubectl 自动补全 2 Kubectl 上下文和配置 3 创建对象 4 显示和查找资源 5 更新资源 6 修补资源 7 编辑资源 ...

  3. 139.00.007 Git学习-Cheat Sheet

    @(139 - Environment Settings | 环境配置) Git虽然极其强大,命令繁多,但常用的就那么十来个,掌握好这十几个常用命令,你已经可以得心应手地使用Git了. 友情附赠国外网 ...

  4. mysql 递归_「MySQL」 - SQL Cheat Sheet - 未完成

    近几个月的心情真是安排的妥妥的,呈现W状.多的不说了,这里对SQL的测试进行简单梳理,制作一份SQL Cheat Sheet. 0x01.数据库基本架构 Clinet层 Server层 连接器 网络连 ...

  5. ubuntu cheat sheet 目录结构

     Ubuntu Cheat Sheet Ubuntu系统目录结构 以下为Ubuntu目录的主要目录结构,您稍微了解它们都包含了哪些文件就可以了,不需要记忆. / 根目录 │ ├boot/ 启动文件.所 ...

  6. Emmet Cheat Sheet(Sublime编辑)

    快捷创建html标签 官网的Emmet Cheat Sheet :http://docs.emmet.io/cheat-sheet/ https://files.cnblogs.com/files/t ...

  7. Nmap Cheat Sheet Part 1

    译者:未知 原文:Nmap Cheat Sheet: From Discovery to Exploits – Part 1: Introduction to Nmap 在侦查期间,扫描一直是信息收集 ...

  8. XSS Cheat Sheet

    XSS Cheat Sheet XSS 101 <h1>Hello,<script>alert(1)</script>!</h1> 1. With &l ...

  9. Cheat sheet FOR Python Packages

    Cheat sheet FOR Python Packages Pyspark Pandas And SO ON

最新文章

  1. linux第七章《档案与目录管理》重点回顾
  2. 实验三:XML模型(二)
  3. mvc mvp mvvm
  4. Spring MVC-07循序渐进之验证器 下 (JSR 303验证)
  5. IntelliJ IDEA 常用设置
  6. BZOJ-3876-支线剧情-Ahoi2014-上下界网络流
  7. tp5 上传文件乱码问题
  8. leetcode 453,462. Minimum Moves to Equal Array Elements I, II | 453, 462. 最少移动次数使数组元素相等(图解)
  9. 第8章6节MonkeyRunner启动运行过程-启动Monkey 2
  10. 计算机编程嘉兴,嘉兴自学电脑编程一对一
  11. java 工厂模式的写法_设计模式-Java-简单工厂模式--BitmapFactory
  12. LIST函数JAVA特点_Java 集合系列 07 List总结(LinkedList, ArrayList等使用场景和性能分析)...
  13. xy转经纬 经纬转xy 各种坐标系
  14. Java的8 大基本类型的包装类和美女选妃案例的两种写法
  15. the system clock has been set more than 24 hours
  16. Linux命令--god
  17. 定义矩形类(长length,宽widen)求面积(area)(简单例子)
  18. 域名备案和SSL证书到服务器配置
  19. 统计学 假设检验(Hypothesis Testing)
  20. 云原生数据中台:架构、方法论与实践

热门文章

  1. Word如何添加批注
  2. 适用场景:All kinds of GCs
  3. AngularJS报错:[$injector:unpr] Unknown provider: $templateRequestProvider
  4. android tag的使用方法,Android setTag方法的key问题解决办法
  5. 使用WHM重新编译Apache+PHP环境
  6. 屏幕录制一键截图工具 FastStone Capture 9.0 绿色便携中文版
  7. 菜鸟学JAVA之——常用类(StringBuffer、StringBuilder、Comparable、Comparator等)
  8. 电脑卡顿反应慢解决办法
  9. Android 调用系统相机并加时间水印
  10. 搭建和设计框架robotframework,重点说明:(https://blog.csdn.net/nich2008/article/details/81296529)