mirror of
https://github.com/samoshkin/tmux-config.git
synced 2026-01-06 17:58:02 +00:00
Open new windows and pane while retaining current working directory
This commit is contained in:
@@ -65,13 +65,16 @@ bind C-e new-window -n 'tmux.conf' "sh -c '\${EDITOR:-vim} ~/.tmux.conf && tmux
|
|||||||
# Reload tmux configuration
|
# Reload tmux configuration
|
||||||
bind C-r source-file ~/.tmux.conf \; display "Config reloaded"
|
bind C-r source-file ~/.tmux.conf \; display "Config reloaded"
|
||||||
|
|
||||||
|
# new window and retain cwd
|
||||||
|
bind c new-window -c "#{pane_current_path}"
|
||||||
|
|
||||||
# Rename session and window
|
# Rename session and window
|
||||||
bind r command-prompt -I "#{window_name}" "rename-window '%%'"
|
bind r command-prompt -I "#{window_name}" "rename-window '%%'"
|
||||||
bind R command-prompt -I "#{session_name}" "rename-session '%%'"
|
bind R command-prompt -I "#{session_name}" "rename-session '%%'"
|
||||||
|
|
||||||
# Split panes
|
# Split panes
|
||||||
bind | split-window -h
|
bind | split-window -h -c "#{pane_current_path}"
|
||||||
bind _ split-window -v
|
bind _ split-window -v -c "#{pane_current_path}"
|
||||||
|
|
||||||
# Select pane and windows
|
# Select pane and windows
|
||||||
bind -r C-[ previous-window
|
bind -r C-[ previous-window
|
||||||
@@ -186,12 +189,6 @@ bind -T copy-mode-vi MouseDown1Pane select-pane \;\
|
|||||||
# tmux show-options -g -s set-clipboard
|
# tmux show-options -g -s set-clipboard
|
||||||
# set-clipboard on|external
|
# set-clipboard on|external
|
||||||
|
|
||||||
# TODO: open new window/pane and retain pwd
|
|
||||||
# bind '"' split-window -c "#{pane_current_path}"
|
|
||||||
# bind % split-window -h -c "#{pane_current_path}"
|
|
||||||
# bind c new-window -c "#{pane_current_path}"
|
|
||||||
|
|
||||||
|
|
||||||
# =====================================
|
# =====================================
|
||||||
# === Theme ===
|
# === Theme ===
|
||||||
# =====================================
|
# =====================================
|
||||||
|
|||||||
Reference in New Issue
Block a user