Skip to content

Commit

Permalink
Make Ctrl arrows work in tmux (liuchengxu#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
pittcat authored and Alvin committed Jan 31, 2019
1 parent ebd287f commit 608118c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions layers/+tools/tmux/config.vim
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,16 @@ if g:spacevim_tmux
endif
"let g:tmuxify_map_prefix = '<leader>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 <xUp>=\e[1;*A"
execute "set <xDown>=\e[1;*B"
execute "set <xRight>=\e[1;*C"
execute "set <xLeft>=\e[1;*D"
execute "set <xHome>=\e[1;*H"
execute "set <xEnd>=\e[1;*F"
endif


0 comments on commit 608118c

Please sign in to comment.