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

Re: bind command key

Expand Messages
  • Nico Weber
    Hi, ... Use nmap :tabnew etc. D is the command key modifier. This will likely clash with Terminal.app s ⌘T binding (which creates a terminal tab).
    Message 1 of 4 , Jul 31, 2008
    • 0 Attachment
      Hi,

      On 31.07.2008, at 11:12, TheClue wrote:

      > im quite new in Vim, but im trying to improve quickly :)
      > for now im just building up my .vimrc file with all my needs and i was
      > wondering if there is a way to bind the command-key in vim (in tty
      > mode, i compiled it without gui) since i would like to mimic camino/
      > safari shortcuts for tabs navigation
      >
      > actually i use this ctrl-based subset:
      >
      > nmap <C-t> :tabnew<CR>
      > nmap <C-d> :tabc<CR>
      > nmap <C-o> :tabe<SPACE>
      >
      > any idea?
      >
      > tnx a lot for help!

      Use

      nmap <D-t> :tabnew<CR>

      etc. D is the command key modifier. This will likely clash with
      Terminal.app's ⌘T binding (which creates a terminal tab).

      Alternatively, get MacVim ( http://code.google.com/p/macvim/ ) which
      has all those shortcuts and more built-in.

      Nico
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Ben Schmidt
      ... No, sorry. Have you tried MacVim? http://code.google.com/p/macvim/ It is the up-and-coming Mac GUI for Vim and has a lot of keys by default mapped to match
      Message 2 of 4 , Jul 31, 2008
      • 0 Attachment
        TheClue wrote:
        > hello!
        >
        > im quite new in Vim, but im trying to improve quickly :)
        > for now im just building up my .vimrc file with all my needs and i was
        > wondering if there is a way to bind the command-key in vim (in tty
        > mode, i compiled it without gui)

        No, sorry.

        Have you tried MacVim? http://code.google.com/p/macvim/

        It is the up-and-coming Mac GUI for Vim and has a lot of keys by default
        mapped to match Safari, etc.

        Ben.



        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Ben Schmidt
        ... In addition to my previous post which addresses your actual question, you may appreciate this hint: don t map too many control keys; most of them have
        Message 3 of 4 , Jul 31, 2008
        • 0 Attachment
          > actually i use this ctrl-based subset:
          >
          > nmap <C-t> :tabnew<CR>
          > nmap <C-d> :tabc<CR>
          > nmap <C-o> :tabe<SPACE>

          In addition to my previous post which addresses your actual question,
          you may appreciate this hint: don't map too many control keys; most of
          them have functions in Vim, and many of them useful. I would say unless
          you know the function of a key and know you definitely don't want to use
          it, don't map it! In this case C-t and C-o in particular are two very
          useful commands both of which 'go back' to the last place your cursor
          jumped from (one with tags and one with just jumps).

          Ben.



          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Ben Schmidt
          ... Actually, it won t work at all. only works in the GUI. Such keys are not passed through the terminal interface to Vim. Ben.
          Message 4 of 4 , Jul 31, 2008
          • 0 Attachment
            > nmap <D-t> :tabnew<CR>
            >
            > etc. D is the command key modifier.

            Actually, it won't work at all. <D-...> only works in the GUI. Such keys
            are not passed through the terminal interface to Vim.

            Ben.



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