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

Menu trigger a user mapping

Expand Messages
  • David Fishburn
    Not quite sure how to set this up. When I create a menu item it usually calls a command vnoremenu MyMenu.Test :Test What I want it to do instead
    Message 1 of 2 , Dec 22, 2012
    • 0 Attachment
      Not quite sure how to set this up.

      When I create a menu item it usually calls a command
      vnoremenu <script> MyMenu.Test  :Test<CR>

      What I want it to do instead is trigger one of my maps.
      vnoremenu <script> MyMenu.Test  \tt

      Except when I try this I just get a beep.
      The examples I see in Vim's help are all calling commands (i.e. :wq).

      Anyone have an example of how to do this?

      Thanks,
      David

      --
      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
    • Nicolas Dermine
      ... Hi David, I do not know a thing about menus, but from what I remember of mappings : vnoremap : the characters on the right hand side will not be remapped
      Message 2 of 2 , Dec 22, 2012
      • 0 Attachment


        On 22 Dec 2012 15:52, "David Fishburn" <dfishburn.vim@...> wrote:
        >
        > Not quite sure how to set this up.
        >
        > When I create a menu item it usually calls a command
        > vnoremenu <script> MyMenu.Test  :Test<CR>
        >
        > What I want it to do instead is trigger one of my maps.
        > vnoremenu <script> MyMenu.Test  \tt
        >
        > Except when I try this I just get a beep.
        > The examples I see in Vim's help are all calling commands (i.e. :wq).
        >
        > Anyone have an example of how to do this?
        >
        > Thanks,
        > David

        Hi David,

        I do not know a thing about menus, but from what I remember of mappings :

        vnoremap : the characters on the right hand side will not be remapped

        vmap : they will

        So maybe there is a vmenu equivalent to your vnoremenu?

        Nico

        >
        > --
        > 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 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
      Your message has been successfully submitted and would be delivered to recipients shortly.