On 2013–07–12 Gary Johnson wrote: > > How can I map M-<arrow-keys> to something useful when I run vim in > > tmux? > > The problem is that tmux sets TERM to "screen" and the key > definitions in the terminfo database for "screen" don't match those > of the terminal you are actually using. > > One way to fix this would be to make tmux set TERM to the name of > the terminal you are actually using, except that the tmux(1) man > page says not to do this.
That's not the right approach. Even if it might work, it will break something else. > Another way to fix this is to redefine those keys in your > ~/.tmux.conf as I have done in mine for function keys. > > # To fix screen terminfo function key entries when using PuTTY: > # > # From https://gist.github.com/pickerweng/1713936 > # > set -g terminal-overrides > "*:kf1=\e[11~:kf2=\e[12~:kf3=\e[13~:kf4=\e[14~:kf5=\e[15~:kf6=\e[17~:kf7=\e[18~:kf8=\e[19~" I can't figure out the correct command line. The terminfo man page is a terrible read. > Yet another way is to redefine those keys in your ~/.vimrc as I did > originally fix the same problem. That's what I wanted to do. Actually I have similar mapping as you do. But I can't figure out the right mapping for Meta-<arrow-keys>. # mappings like these work noremap <esc>[27;5;9~ :bnext!<cr> # the meta-<up> mapping does not work noremap <esc>[1;3A :bnext!<cr> > I'll leave it to you to come up with the mappings you need in your > case, That was actually my question, what these mappings are. > but if you run into problems, I or someone else can help you > further. That would be nice. Marco -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
