mirror of
https://github.com/notwa/rc
synced 2025-02-05 07:43:22 -08:00
fix ctrl+arrows in tmux+vim
This commit is contained in:
parent
9f3d4ef0ef
commit
d07adaf621
2 changed files with 12 additions and 0 deletions
|
@ -12,6 +12,9 @@ bind C-Space send-prefix
|
|||
# this also makes hitting Enter exit copy-mode, which is a godsend
|
||||
setw -g mode-keys vi
|
||||
|
||||
# need this for ctrl+arrows, etc.
|
||||
set-option -g xterm-keys on
|
||||
|
||||
# remove delay on escape key
|
||||
set -sg escape-time 0
|
||||
|
||||
|
|
|
@ -178,6 +178,15 @@ set backspace=eol,start,indent " make backspace useful
|
|||
" tab completion in command-line
|
||||
if has('wildmenu') | set wildmenu | endif
|
||||
|
||||
if &term =~ '^tmux'
|
||||
" https://unix.stackexchange.com/a/34723
|
||||
" tmux will send xterm-style keys when xterm-keys is on
|
||||
execute "set <xUp>=\e[1;*A"
|
||||
execute "set <xDown>=\e[1;*B"
|
||||
execute "set <xRight>=\e[1;*C"
|
||||
execute "set <xLeft>=\e[1;*D"
|
||||
endif
|
||||
|
||||
" easy indent/unindent
|
||||
nn <tab> >>
|
||||
nn <s-tab> <<
|
||||
|
|
Loading…
Add table
Reference in a new issue