Jelajahi Sumber

rebind window splitting to keep current path

Kevin Heinicke 8 tahun lalu
induk
melakukan
3980760ecc
1 mengubah file dengan 7 tambahan dan 2 penghapusan
  1. 7 2
      tmux.conf

+ 7 - 2
tmux.conf

@@ -26,10 +26,15 @@ bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft=
 set -g default-terminal screen-256color
 
 # reload tmux config
-bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
+bind r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
 
 # rebind some clear history command
-bind-key C-l send-keys C-l \; clear-history
+bind C-l send-keys C-l \; clear-history
+
+# reuse directory
+bind '"' split-window -c "#{pane_current_path}"
+bind % split-window -h -c "#{pane_current_path}"
+bind c new-window -c "#{pane_current_path}"
 
 # Use vim keybindings in copy mode
 setw -g mode-keys vi