diff options
Diffstat (limited to '.tmux.conf')
-rw-r--r-- | .tmux.conf | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -65,6 +65,8 @@ bind -T off F6 \ wg_is_keys_off="#[fg=colour15,bg=colour63,bold]#([ $(tmux show-option -qv key-table) = 'off' ] && echo 'OFF')#[fg=colour22] #{?#{pane_ssh_connected},#[fg=colour63 bg=colour24],#[fg=colour63 bg=colour31]}#[default]" +# from christoomey's vim-tmux-nivagator +is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" #key bindings #do not use alt keybindings. because of the escape passed at the beginning of a alt keycode, #zsh's vim mode's escape becomes slow since tmux will have to wait on keybindings beginning with escape. @@ -74,6 +76,9 @@ bind -r k select-pane -U bind -r j select-pane -D bind -r h select-pane -L bind -r l select-pane -R +# bind -n C-w-w select-pane -l +bind-key -Ttable1 'C-w' if-shell "$is_vim" 'send-keys C-w' 'select-pane -l' +bind-key -Troot 'C-w' if-shell "$is_vim" 'send-keys C-w' 'switch-client -Ttable1' # bind -n S-Right next-window # bind -n S-Left previous-window bind -n C-k next-window @@ -82,10 +87,10 @@ bind -n C-j previous-window # bind -n M-Down select-pane -D # bind -n M-Left select-pane -L # bind -n M-Right select-pane -R -bind -r C-k select-pane -U -bind -r C-j select-pane -D -bind -r C-h select-pane -L -bind -r C-l select-pane -R +# bind -r C-k select-pane -U +# bind -r C-j select-pane -D +# bind -r C-h select-pane -L +# bind -r C-l select-pane -R setw -g mode-keys vi bind [ copy-mode bind -T copy-mode-vi 'v' send -X begin-selection |