9
Tmux tips & tricks

Tmux tips and_tricks

Embed Size (px)

Citation preview

Page 1: Tmux tips and_tricks

Tmux tips & tricks

Page 2: Tmux tips and_tricks

Overview

1. keeping .tmux.conf short

2. tmux workflow: managing windows & sessions

3. fast session switching

Page 3: Tmux tips and_tricks

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

Page 4: Tmux tips and_tricks

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

Page 5: Tmux tips and_tricks

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

Page 6: Tmux tips and_tricks

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.

Page 7: Tmux tips and_tricks

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

Page 8: Tmux tips and_tricks

3. fast session switching

• you already know where you want to “go” • session name completion

Page 9: Tmux tips and_tricks

Questions? Feedback?