Did you turn on xterm-keys?
-------- Original message --------
From: Marco <net...@lavabit.com>
Date: 14/07/2013 15:39 (GMT+01:00)
To: tmux <tmux-users@lists.sourceforge.net>
Subject: Mapping meta key within tmux in vim
Hi,
I raised this issue already on the vim mailing list¹ without finding
a solution. There are probably plenty of vim users on this list.
Maybe someone knows how to tackle this.
I have mappings in my .vimrc that map the Meta-arrow keys
noremap <silent> <M-up> <C-W>+
noremap <silent> <M-down> <C-W>-
This works fine in console vim, but it fails when vim is used within
tmux. Then I get sequences like:
[1;3Aá]
[1;3Bá]
When I call cat -v from the console (TERM=rxvt-unicode-256color) and
press M-<up> M-<down> I get the following:
^[^[[A
^[^[[A
^[^[[B
^[^[[B
When I call cat -v from the console within tmux
(TERM=screen-256color) and press M-<up> M-<down> I get the
following:
^[[1;3A
^[[1;3A
^[[1;3B
^[[1;3B
Which means the terminal interprets the key sequences differently. I
have other mappings which work without problems, like:
noremap <esc>[27;5;9~ :bnext!<cr>
noremap <esc>[27;6;9~ :bprevious!<cr>
How can I map M-<arrow-keys> to something useful when I run vim in
tmux?
Marco
¹ http://thread.gmane.org/gmane.editors.vim/112681
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
__________________
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users