introduction to tmux - codementor tmux office hours part 1
Post on 15-Jun-2015
2.433 Views
Preview:
DESCRIPTION
TRANSCRIPT
Starting Tmux
Problem with the vanilla console app?
• managing (huge) number of terminals
• example terminals for just one project
Problem with the vanilla console app?
• example terminals multiple projects
Solution?Tmux - terminal multiplexer
• “Core” features:
• multiple windows
• window splits (horizontal & vertical)
• sessions (groups of windows)
• persistant env
• Other advanced features
Installing Tmux
• Mac$ brew install tmux$ brew install reattach-to-user-namespace (fixes pbpaste)
• Linux$ apt-get install -y tmux
Recommended configuration• ~/.tmux.conf - tmux config file
• remap default “prefix” from Ctrl-b to Ctrl-a
• set -g prefix C-a # in .tmux.conf
• remap Caps Lock to Ctrl (on a system level)
Demo: starting tmux
• just type $ tmux
Demo: creating new windows
• prefix + c
Demo: navigating windows
• previous window: prefix + p • next window: prefix + n • specific window: prefix + <num>
Demo: splitting windows
• vertical split: prefix + % • horizontal split: prefix + “
*unusual choiceof keys
Demo: split movement
• prefix + <arrow key>
Demo: creating sessions
• prefix + :new -s session_name *veryinconvenient
Demo: switching sessions
• switch session: prefix + s • navigate sessions: j, k (or arrow keys)
Demo: detaching tmux
• detach: prefix + d • attach: $ tmux attach
Tmux demo roundup• manipulating windows
• manipulating splits
• manipulating sessions
• some quirky defaults => Tmux configuration
Basic Tmux configuration• very configurable
• any key-binding can be changed
• “community standards” - things everyone has in their .tmux.conf
Configuration via plugins• tmux-sensible
- handles tmux quirks and boilerplate configuration
• tmux-pain-control- convenient basic key bindings
• tmux-sessionist- better session handling
Installing plugins
Plugin benefits
• less tmux quirks • more vim :)
Next steps?• look up tmux copy mode (scrollback)
• $ man tmux
• use tmux daily
• tmux book
• more pluginshttps://github.com/tmux-plugins
Questions?
top related