Zachary W. Huang

Home Projects Blog Guides Resume

A tmux gem

May 11, 2026

Somehow I only ever came across this nice tmux “hack” recently, where you can rebind c, ", and % so that they open a new window/pane in the same directory as your current pane. This has genuinely been so useful, since I no longer have to cd or try to z back into the directory I was already in every time I open a new window or pane.

# ~/.tmux.conf

bind c new-window -c "#{pane_current_path}"
bind '%' split-window -h -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"

bind C new-window
bind '' split-window -h
bind '-' split-window

I also defined some extra bindings so that I can get the old behavior back when I want in the case that I do actually want to open a new window/pane in my home directory. Now, I use all of these bindings probably dozens of times every day.

github logo linkedin logo

Zachary W. Huang © 2021-2026