Skip to content

Instantly share code, notes, and snippets.

@william8th
Last active April 21, 2025 15:44
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}"
@tracure1337
Copy link

how to make it work with
set -g mouse on ?

image

@maestromac
Copy link

Thank you for this!

@raphaklaus
Copy link

Indeed a time saver :D

@morphalus
Copy link

Thanks!

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