commit 66205b3280e755c2a955b63698540b5320d2fc57 (patch)
parent 9b389c736c63f7a8a286ee5bc41bb04ecc4fd232
Author: Alexander Karle <akarle@umass.edu>
Date: Tue, 5 Dec 2017 22:03:53 -0500
stay in same directory when splitting windows/pane
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tmux.conf b/tmux.conf
@@ -4,11 +4,14 @@ set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
-bind | split-window -h
-bind - split-window -v
+bind | split-window -h -c "#{pane_current_path}"
+bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
+# new window same directory
+bind c new-window -c "#{pane_current_path}"
+
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf