Skip to content

Instantly share code, notes, and snippets.

@william8th
Last active April 10, 2024 02:16
Show Gist options
  • Save william8th/faf23d311fc842be698a1d80737d9631 to your computer and use it in GitHub Desktop.
Save william8th/faf23d311fc842be698a1d80737d9631 to your computer and use it in GitHub Desktop.
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}"
@robsgreen
Copy link

Thank you! Saves me so much daily frustration.

@MrRoiz
Copy link

MrRoiz commented Nov 2, 2022

Awesome, thanks! 🚀

@helmerdavila
Copy link

🙌

@endepointe
Copy link

this did not work in cygwin 3.3.6. hmmm

@jonathanforhan
Copy link

you're a G thank you

@mtovmassian
Copy link

🙏

@halshar
Copy link

halshar commented May 28, 2023

Here is all I added to mine, if you wanna see the "bare minimum requirements":

# window splits
bind-key v split-window -h -c "#{pane_current_path}"
bind-key b split-window -c "#{pane_current_path}"

thank you for this :) @shmup

@chmnoh
Copy link

chmnoh commented Jun 29, 2023

Great!

@Normanras
Copy link

Did not think it would work so flawlessly. Just adding to the awesomeness and praise! Good job 👍

@anggakharisma
Copy link

Amazing thank you for this 👌

@adityak714
Copy link

Thanks!!

@yoandresaav
Copy link

thanks!

@ltyiz07
Copy link

ltyiz07 commented Mar 18, 2024

Just working!

@LordMoMA
Copy link

thanks, so good!

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