19 Jan 2014 21:38:19
Tmux Vim and <S-Tab> (Shift) keybindings problems
If you start vim on top of tmux some keybindings won't be working. I solved it for myself here is solution.First set up correct $TERM bash variable for your terminal. I'm using urxvt there is mine:
# if you don't use zsh replace it by ~/.bashrc echo "export TERM=rxvt-256color" >> ~/.zshrcThere is main solution type cat in your terminal (under started tmux)
catAnd then just type Shift+Tab you should see something like this
terminal > cat ^[[ZThen we should map this sequence within vim, please use your own char sequence if it's differ from mine I use next config to identify is current terminal session under tmux & bind proper key rely on check.
vim ~/.vimrcPlease note to type ^[ prefix character in vim you should enter insert mode & type
let g:Tmux = system('echo $TMUX') let g:Tmux = substitute(g:Tmux,"\\s\\|\\n\\|\\r","","g") " Consider tmux keybinds handling. if g:Tmux != '' nnoremap <silent> ^[[Z :call MRU_toggle()<CR> else nnoremap <silent> <S-TAB> :call MRU_toggle()<CR> endif
<C-V> + EscIf you type it as plain text it won't be work