News for hackers. Stuff that matters.
Re:Getting started with Tmux by bovine3dom on Sunday September 16, 2018 @02:01PM (#18000158)
My favourite little tmux trick is in ~/.tmux.conf:

`bind r attach-session -c "#{pane_current_path}"`

All the terminals I open start a new tmux session (left as an exercise to the reader). I change directory to whatever project I'm working on, hit `C-b r` and from then on all panes and and windows in that session will start in the correct directory. Saves me a lot of cd'ing.

Re:Getting started with Tmux by cryptonector on Sunday September 16, 2018 @06:03PM (#18001429)
Re:Getting started with Tmux by 3PS on Sunday September 16, 2018 @06:20PM (#18001544)
Ohhh, thank you! One of my biggest annoyances so far was exactly this - every time I split off a new pane, I'd have to cd back to wherever I was working.
Re:Getting started with Tmux by wocram on Monday September 17, 2018 @02:30AM (#18003655)
If you want the directory to come from your current pane instead of the current session, it's a little easier:

  bind '"' split-window -v -c "#{pane_current_path}"
  bind % split-window -h -c "#{pane_current_path}"
https://github.com/mfarrugi/.dots/blob/master/tmux/.tmux.con...
Re:Getting started with Tmux by kmundnic on Sunday September 16, 2018 @08:40PM (#18002247)
This can be done too in MacOS by configuring iTerm2 to open a new pane in the same directory and using tmux integration. Cool part is you don't have to learn the tmux commands, but you can use the iTerm2 commands to split panes, among other things.

Edit: Added MacOs