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

map command key

Expand Messages
  • Ruby185
    hi, I want to map Command key plus left arrow and right arrow to open left and right tabs by: map :tabp map :tabn but it
    Message 1 of 4 , Mar 24 8:17 AM
      hi,

      I want to map Command key plus left arrow and right arrow to open left
      and right tabs by:

      map <M-LEFT> <ESC>:tabp<CR>
      map <M-RIGHT> <ESC>:tabn<CR>

      but it has no effect, though replace M with C for control works.

      Any idea why it doesn't work for command key?

      Thanks

      Ruby

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Derek Wyatt
      I don t think M is the right key. Try mapping the cmd-arrow key literally by using ^v - i.e. Hit ctrl-v and then hit command-arrow. That just might manifest
      Message 2 of 4 , Mar 24 3:21 PM
        I don't think "M" is the right key. Try mapping the cmd-arrow key literally by using ^v - i.e. Hit ctrl-v and then hit command-arrow.

        That just might manifest as <D-Left>. It does for me at least

        ------Original Message------
        From: Ruby185
        Sender: vim_mac@...
        To: vim_mac
        ReplyTo: vim_mac@...
        Subject: map command key
        Sent: Mar 24, 2009 11:17


        hi,

        I want to map Command key plus left arrow and right arrow to open left
        and right tabs by:

        map <M-LEFT> <ESC>:tabp<CR>
        map <M-RIGHT> <ESC>:tabn<CR>

        but it has no effect, though replace M with C for control works.

        Any idea why it doesn't work for command key?

        Thanks

        Ruby




        Entered using opposable digits...

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Kyle Lippincott
        Command is D, so you want and . M- is supposed to be for alt/option, but it doesn t appear to work for me. -Kyle ...
        Message 3 of 4 , Mar 24 3:42 PM
          Command is D, so you want <D-Left> and <D-Right>.  M- is supposed to be for alt/option, but it doesn't appear to work for me.

          -Kyle

          On Tue, Mar 24, 2009 at 8:17 AM, Ruby185 <fwang2@...> wrote:

          hi,

          I want to map Command key plus left arrow and right arrow to open left
          and right tabs by:

          map <M-LEFT> <ESC>:tabp<CR>
          map <M-RIGHT> <ESC>:tabn<CR>

          but it has no effect, though replace M with C for control works.

          Any idea why it doesn't work for command key?

          Thanks

          Ruby




          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---

        • björn
          ... May I also suggest that you change your mapping to remap the corresponding menu item instead of using :map. This is covered in the ... As for Kyle s
          Message 4 of 4 , Mar 25 2:21 AM
            >2009/3/24 Kyle Lippincott:
            > On Tue, Mar 24, 2009 at 8:17 AM, Ruby185 wrote:
            >>
            >> I want to map Command key plus left arrow and right arrow to open left
            >> and right tabs by:
            >>
            >> map <M-LEFT> <ESC>:tabp<CR>
            >> map <M-RIGHT> <ESC>:tabn<CR>
            >>
            >> but it has no effect, though replace M with C for control works.
            >>
            >> Any idea why it doesn't work for command key?
            > Command is D, so you want <D-Left> and <D-Right>. M- is supposed to be for
            > alt/option, but it doesn't appear to work for me.

            May I also suggest that you change your mapping to remap the
            corresponding menu item instead of using :map. This is covered in the
            help file, see ":h macvim|/D-Left" which says:

            :macm Window.Previous\ Tab key=<D-Left>
            :macm Window.Next\ Tab key=<D-Right>

            As for Kyle's problem with mapping to M-; this was fixed not too long
            ago. You must ":set macmeta" before you can map to <M-..>, see ":h
            'macmeta'".

            Björn

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          Your message has been successfully submitted and would be delivered to recipients shortly.