Skip to main content
2 of 11
added 300 characters in body
Michael Durrant
  • 17.5k
  • 21
  • 50
  • 73

How can I get tmux to split a window (pane) and keep the current directory?

On my linux I have keys mapped to allow me to split windows and then switch between new panes.

With or without these mappings I can't figure out the key combo's on my mac to get tmux to divide the terminal window and keep me in whatever directory I'm currently in, for the new window. This is really handy for all my terminal work.

I can use the Iterm menu itself and/or the shortcut key combos it shows but these all seem to be are Iterm split windows not tmux and the one thing they don't do is set the same directory, they go to the my home directory (~).

Note this is not about switching tmux panes. My mapping for that seems to be ok (though with only 1 tmux pane, so far I've only been able to switch to it, 0.) and it's not about switching Iterm panes as in iterm - what's the key-combo to switch panes?

Does anyone know the key combo or mapping I can use/make to get the 'tmux split and stay in directory' functionality on my mac. Model is about 2 years old.

Michael Durrant
  • 17.5k
  • 21
  • 50
  • 73