Sending Ctrl-Right to Vim inside Tmux -


i'm using vim that's running inside tmux session. within vim, have ctrl-right bound :tabnext:

map <c-right> :tabnext<cr>      "next tab 

i want able invoke binding when vim inside tmux, added following .tmux.conf:

bind-key -n c-right send-keys c-right 

but doesn't have discernible effect on either tmux or vim! doing wrong here?

thanks in advance.

i got working though i'm treading unknown territory here. perhaps else can fill in rest.

the first difference noticed when starting vim in terminal , vim inside tmux in 'term' setting.

when asked :set term?, ordinary terminal vim answered xterm-256color, tmux vim answered screen. it's important understand exact key codes sent in terminal depend on type of terminal.

one solution make tmux , vim speak same language. in tmux:

set-option -gw xterm-keys on bind-key -n c-right send-keys c-right 

in vim:

:set term=xterm-256color 

now vim , tmux understand each other's terminal key codes , key strokes make way vim.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -