Upload
codementor
View
1.545
Download
1
Tags:
Embed Size (px)
Citation preview
Tmux tips & tricks
Overview
1. keeping .tmux.conf short
2. tmux workflow: managing windows & sessions
3. fast session switching
1. keeping .tmux.conf short• *huge* tmux.conf files with 200+ LOC
• “community standard” key bindings + plugins:tmux-sensibletmux-pain-control
• build your own plugin
2. managing windows & sessions
Classic tmux workflow
• conservative number of sessionsEg: 2 sessions ‘work’ and ‘private’
• 1 session = many projects
• highly maintained list of windows and panes
• strict window layouts
2. managing windows & sessions
Recommended workflow
• terminals are “cheap”: create windows & sessions liberally
• no need to “manage” or “delete” unused panes, windows or sessions
• 1 session = 1 project works well
• create window layout on the go (because it’s fast and easy)
• *everything* should be fast and easy
3. fast session switching• problem with a large number of
sessions
• `prefix + s` does not work for 5+ sessions.It takes too long to “visually” find the desired session and switch to it.
3. fast session switching• recommendation:
tmux-sessionist plugin `prefix + g`
• principle:- tell tmux what to do - don’t “visually parse” Credit: Gary Bernhardt and his vim tips
3. fast session switching
• you already know where you want to “go” • session name completion
Questions? Feedback?