tmux 2.4 got rid of mode keys. Closes #42
- vi-copy is replaced by a normal copy-mode-vi key table - vi-edit and vi-choice are gone
This commit is contained in:
parent
4aada9c712
commit
b0c3b6a09f
49
.tmux.conf
49
.tmux.conf
|
@ -11,7 +11,6 @@ set -g default-terminal "screen-256color" # colors!
|
||||||
setw -g xterm-keys on
|
setw -g xterm-keys on
|
||||||
set -s escape-time 10 # faster command sequences
|
set -s escape-time 10 # faster command sequences
|
||||||
set -sg repeat-time 600 # increase repeat timeout
|
set -sg repeat-time 600 # increase repeat timeout
|
||||||
set -s quiet on # disable various messages
|
|
||||||
set -s focus-events on
|
set -s focus-events on
|
||||||
|
|
||||||
set -g prefix2 C-a # GNU-Screen compatible prefix
|
set -g prefix2 C-a # GNU-Screen compatible prefix
|
||||||
|
@ -93,25 +92,25 @@ bind U run "cut -c3- ~/.tmux.conf | sh -s _urlview #{pane_id}"
|
||||||
bind F run "cut -c3- ~/.tmux.conf | sh -s _fpp #{pane_id}"
|
bind F run "cut -c3- ~/.tmux.conf | sh -s _fpp #{pane_id}"
|
||||||
|
|
||||||
|
|
||||||
# -- list choice ---------------------------------------------------------------
|
# -- list choice (tmux < 2.4) --------------------------------------------------
|
||||||
|
|
||||||
bind -t vi-choice h tree-collapse
|
# vi-choice is gone in tmux >= 2.4
|
||||||
bind -t vi-choice l tree-expand
|
run -b 'tmux bind -t vi-choice h tree-collapse 2> /dev/null || true'
|
||||||
run -b 'tmux bind -t vi-choice K start-of-list 2> /dev/null'
|
run -b 'tmux bind -t vi-choice l tree-expand 2> /dev/null || true'
|
||||||
run -b 'tmux bind -t vi-choice J end-of-list 2> /dev/null'
|
run -b 'tmux bind -t vi-choice K start-of-list 2> /dev/null || true'
|
||||||
bind -t vi-choice H tree-collapse-all
|
run -b 'tmux bind -t vi-choice J end-of-list 2> /dev/null || true'
|
||||||
bind -t vi-choice L tree-expand-all
|
run -b 'tmux bind -t vi-choice H tree-collapse-all 2> /dev/null || true'
|
||||||
bind -t vi-choice Escape cancel
|
run -b 'tmux bind -t vi-choice L tree-expand-all 2> /dev/null || true'
|
||||||
|
run -b 'tmux bind -t vi-choice Escape cancel 2> /dev/null || true'
|
||||||
|
|
||||||
|
|
||||||
# -- edit mode -----------------------------------------------------------------
|
# -- edit mode (tmux < 2.4) ----------------------------------------------------
|
||||||
|
|
||||||
# the following vi-copy bindings match my vim settings
|
# vi-edit is gone in tmux >= 2.4
|
||||||
# see https://github.com/gpakosz/.vim.git
|
run -b 'tmux bind -ct vi-edit H start-of-line 2> /dev/null || true'
|
||||||
bind -ct vi-edit H start-of-line
|
run -b 'tmux bind -ct vi-edit L end-of-line 2> /dev/null || true'
|
||||||
bind -ct vi-edit L end-of-line
|
run -b 'tmux bind -ct vi-edit q cancel 2> /dev/null || true'
|
||||||
bind -ct vi-edit q cancel
|
run -b 'tmux bind -ct vi-edit Escape cancel 2> /dev/null || true'
|
||||||
bind -ct vi-edit Escape cancel
|
|
||||||
|
|
||||||
|
|
||||||
# -- copy mode -----------------------------------------------------------------
|
# -- copy mode -----------------------------------------------------------------
|
||||||
|
@ -121,14 +120,16 @@ bind b list-buffers # list paster buffers
|
||||||
bind p paste-buffer # paste from the top pate buffer
|
bind p paste-buffer # paste from the top pate buffer
|
||||||
bind P choose-buffer # choose which buffer to paste from
|
bind P choose-buffer # choose which buffer to paste from
|
||||||
|
|
||||||
# the following vi-copy bindings match my vim settings
|
run -b 'tmux bind -t vi-copy v begin-selection 2> /dev/null || true'
|
||||||
# see https://github.com/gpakosz/.vim.git
|
run -b 'tmux bind -T copy-mode-vi v send -X begin-selection 2> /dev/null || true'
|
||||||
bind -t vi-copy v begin-selection
|
run -b 'tmux bind -t vi-copy C-v rectangle-toggle 2> /dev/null || true'
|
||||||
bind -t vi-copy C-v rectangle-toggle
|
run -b 'tmux bind -T copy-mode-vi C-v send -X rectangle-toggle 2> /dev/null || true'
|
||||||
bind -t vi-copy y copy-selection
|
run -b 'tmux bind -t vi-copy y copy-selection 2> /dev/null || true'
|
||||||
bind -t vi-copy Escape cancel
|
run -b 'tmux bind -T copy-mode-vi y send -X copy-selection 2> /dev/null || true'
|
||||||
bind -t vi-copy H start-of-line
|
run -b 'tmux bind -t vi-copy Escape cancel 2> /dev/null || true'
|
||||||
bind -t vi-copy L end-of-line
|
run -b 'tmux bind -T copy-mode-vi Escape send -X cancel 2> /dev/null || true'
|
||||||
|
run -b 'tmux bind -t vi-copy H start-of-line 2> /dev/null || true'
|
||||||
|
run -b 'tmux bind -T copy-mode-vi L send -X end-of-line 2> /dev/null || true'
|
||||||
|
|
||||||
# copy to Mac OSX pasteboard
|
# copy to Mac OSX pasteboard
|
||||||
if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"'
|
if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"'
|
||||||
|
|
Loading…
Reference in New Issue