From 07d48081ef10dd97a858c117ffc2eeb3a6245275 Mon Sep 17 00:00:00 2001 From: pittcat Date: Thu, 5 Apr 2018 14:36:46 +0800 Subject: [PATCH] Make Ctrl arrows work in tmux (#286) --- layers/+tools/tmux/config.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/layers/+tools/tmux/config.vim b/layers/+tools/tmux/config.vim index 257974d0..4c662498 100644 --- a/layers/+tools/tmux/config.vim +++ b/layers/+tools/tmux/config.vim @@ -13,3 +13,16 @@ if g:spacevim_tmux endif "let g:tmuxify_map_prefix = 'u' endif + +" fix Ctrl arrow tmux and vim --> https://stackoverflow.com/questions/15445481/mapping-arrow-keys-when-running-tmux +if &term =~ '^screen' + " tmux will send xterm-style keys when its xterm-keys option is on + execute "set =\e[1;*A" + execute "set =\e[1;*B" + execute "set =\e[1;*C" + execute "set =\e[1;*D" + execute "set =\e[1;*H" + execute "set =\e[1;*F" +endif + +