Guest User

Untitled

a guest
Nov 22nd, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. # tmux cheat sheet
  2.  
  3. ## Managing sessions
  4.  
  5. Creating a session:
  6.  
  7. tmux new-session -s work
  8.  
  9. Create a new session that shares all windows with an existing session, but has its own separate notion of which window is current:
  10.  
  11. tmux new-session -s work2 -t work
  12.  
  13. Attach to a session:
  14.  
  15. tmux attach -t work
  16.  
  17. Detach from a session: `C-b d`.
  18.  
  19. Switch between sessions:
  20.  
  21. C-b ( previous session
  22. C-b ) next session
  23. C-b L ‘last’ (previously used) session
  24. C-b s choose a session from a list
  25.  
  26. Other:
  27.  
  28. C-b $ rename the current session
  29. C-b
  30.  
  31.  
  32. ## Managing windows
  33.  
  34. Create a window:
  35.  
  36. C-b c create a new window
  37.  
  38. Switch between windows:
  39.  
  40. C-b 1 ... switch to window 1, ..., 9, 0
  41. C-b 9
  42. C-b 0
  43. C-b p previous window
  44. C-b n next window
  45. C-b l ‘last’ (previously used) window
  46. C-b w choose window from a list
  47.  
  48. Switch between windows with a twist:
  49.  
  50. C-b M-n next window with a bell, activity or
  51. content alert
  52. C-b M-p previous such window
  53.  
  54.  
  55. Other:
  56.  
  57. C-b , rename the current window
  58. C-b & kill the current window
  59.  
  60.  
  61. ## Managing split panes
  62.  
  63. Creating a new pane by splitting an existing one:
  64.  
  65. C-b " split vertically (top/bottom)
  66. C-b % split horizontally (left/right)
  67.  
  68. Switching between panes:
  69.  
  70. C-b left go to the next pane on the left
  71. C-b right (or one of these other directions)
  72. C-b up
  73. C-b down
  74. C-b o go to the next pane (cycle through all of them)
  75. C-b ; go to the ‘last’ (previously used) pane
  76.  
  77. Moving panes around:
  78.  
  79. C-b { move the current pane to the previous position
  80. C-b } move the current pane to the next position
  81. C-b C-o rotate window ‘up’ (i.e. move all panes)
  82. C-b M-o rotate window ‘down’
  83. C-b ! move the current pane into a new separate
  84. window (‘break pane’)
  85. C-b :move-pane -t :3.2
  86. split window 3's pane 2 and move the current pane there
  87.  
  88. Resizing panes:
  89.  
  90. C-b M-up, C-b M-down, C-b M-left, C-b M-right
  91. resize by 5 rows/columns
  92. C-b C-up, C-b C-down, C-b C-left, C-b C-right
  93. resize by 1 row/column
  94.  
  95. Applying predefined layouts:
  96.  
  97. C-b M-1 switch to even-horizontal layout
  98. C-b M-2 switch to even-vertical layout
  99. C-b M-3 switch to main-horizontal layout
  100. C-b M-4 switch to main-vertical layout
  101. C-b M-5 switch to tiled layout
  102. C-b space switch to the next layout
  103.  
  104.  
  105. Other:
  106.  
  107. C-b x kill the current pane
  108. C-b q display pane numbers for a short while
  109.  
  110.  
  111. ## Other config file settings
  112.  
  113. Some other settings that I use:
  114.  
  115. setw -g xterm-keys on
Add Comment
Please, Sign In to add comment