2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-15 06:12:59 +00:00
cheat.sheets/sheets/tmux

115 lines
3.1 KiB
Plaintext
Raw Normal View History

2020-05-07 16:21:39 +00:00
# tmux
# Terminal multiplexer, with multiple sessions with windows, panes support
# https://github.com/tmux/tmux
#
# toc:
# ~window
2020-05-07 16:21:39 +00:00
# ~pane
# ~misc
2020-05-07 16:26:40 +00:00
# ~copymode
2020-05-07 16:21:39 +00:00
# ~layout
# Start a new session:
tmux
# Start a new named session:
tmux new-session -s name
# List existing sessions:
tmux ls
# Attach to the most recently used session:
tmux attach-session
# Attach to a named session:
tmux attach-session -t name
# windows (tabs)
# ---
2020-05-07 16:21:39 +00:00
# c create window
# w list windows
# n next window
# p previous window
# f find window
# , name window
# & kill window
# panes (splits)
# ---
# % vertical split
# " horizontal split
#
2020-05-07 16:21:39 +00:00
# → go to the left (right, top, bottom) panel
# C-→ resize panel to the left (right, top, bottom) panel
# o swap panes
# q show pane numbers (type the key to go to the pane)
# x kill pane
# + break pane into window (e.g. to select text by mouse to copy)
# - restore pane from window
# ⍽ (space) toggle between layouts
# { (Move the current pane left)
# } (Move the current pane right)
# z toggle pane zoom
2020-10-17 10:57:30 +00:00
# sessions
# ---
# ) switch to next session
# ( switch to previous session
2020-05-07 16:21:39 +00:00
# misc
# ---
# d detach
# t big clock
# ? list shortcuts
# : prompt
2020-05-07 16:26:40 +00:00
# copy mode (copymode)
2020-05-07 16:21:39 +00:00
# ---
# [ go into copy mode
2020-05-07 16:21:39 +00:00
# ] paste into the current window
#
# setw -g mode-keys vi # to switch into vi mode
#
# Function vi emacs
# -----------------------------------------------
# Back to indentation ^ M-m
# Start selection Space C-space
# 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
# layout
# ---
# alt-1 select-layout even-horizontal
# alt-2 select-layout even-vertical
# Sources:
# https://gist.github.com/MohamedAlaa/2961058
# https://gist.github.com/michaellihs/b6d46fa460fa5e429ea7ee5ff8794b96