mirror of
https://github.com/notwa/rc
synced 2024-05-03 04:03:24 -07:00
fix ctrl+arrows in tmux+vim
This commit is contained in:
parent
9f3d4ef0ef
commit
d07adaf621
|
@ -12,6 +12,9 @@ bind C-Space send-prefix
|
||||||
# this also makes hitting Enter exit copy-mode, which is a godsend
|
# this also makes hitting Enter exit copy-mode, which is a godsend
|
||||||
setw -g mode-keys vi
|
setw -g mode-keys vi
|
||||||
|
|
||||||
|
# need this for ctrl+arrows, etc.
|
||||||
|
set-option -g xterm-keys on
|
||||||
|
|
||||||
# remove delay on escape key
|
# remove delay on escape key
|
||||||
set -sg escape-time 0
|
set -sg escape-time 0
|
||||||
|
|
||||||
|
|
|
@ -178,6 +178,15 @@ set backspace=eol,start,indent " make backspace useful
|
||||||
" tab completion in command-line
|
" tab completion in command-line
|
||||||
if has('wildmenu') | set wildmenu | endif
|
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
|
" easy indent/unindent
|
||||||
nn <tab> >>
|
nn <tab> >>
|
||||||
nn <s-tab> <<
|
nn <s-tab> <<
|
||||||
|
|
Loading…
Reference in New Issue
Block a user