Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Tmux open new pane in same directory
# Set the control character to Ctrl+Spacebar (instead of Ctrl+B)
set -g prefix C-space
unbind-key C-b
bind-key C-space send-prefix
# Set new panes to open in current directory
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
Copy link

JosephPenaQuino commented Dec 18, 2020


Copy link

jpluschh commented Dec 20, 2020

Thank you so much!!

Copy link

MuizU commented Jan 29, 2021

Is the unbinding of key B required?

Copy link

william8th commented Jan 29, 2021

Is the unbinding of key B required?

@MuizU nope, you don't need to do the binding! That's entirely optional

Copy link

patientzero commented Mar 5, 2021

Thanks man!

Copy link

guitarmanvt commented Apr 21, 2021

Thank you, sir. Exactly what I needed.

Copy link

simonhessner commented Apr 27, 2021

I get this error with tmux 3.0a on Ubuntu:

$bind c new-window -c "#{pane_current_path}"
readline: c: no key sequence terminator
readline: new-window: no key sequence terminator
readline: -c: no key sequence terminator

Copy link

jorgegso commented Apr 28, 2021

Thanks man!

Copy link

tlhenvironment commented May 26, 2021

i wanna have your babies

Copy link

ghost commented Aug 11, 2021

Thank you!

Copy link

nyngwang commented Aug 12, 2021

Fucking awesome!

Copy link

zetetic commented Aug 23, 2021

I didn't realize how much I needed this. Thanks.

Copy link

thriveth commented Sep 7, 2021

Great, thanks. This should be the default behavior.

Copy link

bisscuitt commented Oct 19, 2021

No over-exaggeration when I say this.... but this is LIFE CHANGING! ;)

Copy link

liukanglai commented Nov 4, 2021


Copy link

sadwhale09 commented Dec 19, 2021


Copy link

dlvhdr commented Jan 25, 2022

Thank you!

Copy link

kyb3rcipher commented Feb 19, 2022

Work :)

Copy link

sahilrajput03 commented Mar 8, 2022

Thank you!

Copy link

zeddidragon commented Mar 10, 2022


Copy link

argaytan commented Mar 15, 2022

Thanks !!!

Copy link

alejandropereira commented Mar 22, 2022


Copy link

gxferreira commented Mar 24, 2022

You are a lifesaver!!! Thank u!

Copy link

sam-artuso commented Mar 30, 2022


Copy link

davidalencar commented Mar 31, 2022


Copy link

chapeupreto commented Apr 27, 2022

Awesome!! Thx!!

Copy link

abuGit commented Apr 27, 2022

Thanks! Works well !!!

Copy link

jbankes commented May 1, 2022

This is great! Thank you!

Copy link

AlexwannaCode commented May 6, 2022

save lots of time! thx!

Copy link

NathanielRN commented May 9, 2022

You are amazing, thank you senpai 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment