Loading ...
Sorry, an error occurred while loading the content.

Re: Mapping meta key within tmux

Expand Messages
  • Gary Johnson
    ... I didn t have much time for experimentation when I first replied. Now that I have a little more time, mapping the sequence for proved more difficult
    Message 1 of 6 , Jul 14, 2013
    • 0 Attachment
      On 2013-07-13, Marco wrote:
      > On 2013–07–12 Gary Johnson wrote:
      >
      > > > How can I map M-<arrow-keys> to something useful when I run vim in
      > > > tmux?

      > > 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.

      I didn't have much time for experimentation when I first replied.
      Now that I have a little more time, mapping the sequence for <M-Up>
      proved more difficult than I expected. I think the secret is to put
      this in your ~/.tmux.conf:

      set -g xterm-keys on

      After doing that, my mappings of <Esc>[1;3A seemed to work.

      HTH,
      Gary

      --
      --
      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 vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Marco
      ... The combination of xterm-keys and the [1;3A mapping works. Thanks a lot. Marco -- -- You received this message from the vim_use maillist. Do not
      Message 2 of 6 , Jul 15, 2013
      • 0 Attachment
        On 2013–07–14 Gary Johnson wrote:

        > I didn't have much time for experimentation when I first replied.
        > Now that I have a little more time, mapping the sequence for <M-Up>
        > proved more difficult than I expected. I think the secret is to put
        > this in your ~/.tmux.conf:
        >
        > set -g xterm-keys on
        >
        > After doing that, my mappings of <Esc>[1;3A seemed to work.

        The combination of xterm-keys and the <Esc>[1;3A mapping works.
        Thanks a lot.

        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 vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      Your message has been successfully submitted and would be delivered to recipients shortly.