tmux create new window on current directory

When you start a new window or split pane on tmux, it always start with the directory from where you run tmux command.

I prefer it start with current working directory of active tmux window. To do this, edit file

vi ~/.tmux.conf

Add

bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *