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

command line mappings in wildmenu

Expand Messages
  • clime
    With respect to this thread on so: http://stackoverflow.com/questions/14842987/vim-wildmenu-move-into-subdirectory-with-a-different-key-than-down It seems like
    Message 1 of 3 , Feb 13, 2013
    View Source
    • 0 Attachment
      With respect to this thread on so: http://stackoverflow.com/questions/14842987/vim-wildmenu-move-into-subdirectory-with-a-different-key-than-down

      It seems like command-line mappings aren't interpreted in wildmenu mode, and instead exit it and insert the 'wildchar' literally.

      Would it be possible to interpret these mappings and potentially add wildmenuvisible() - a function analog to the pumvisible()?

      Best regards
      clime

      --
      --
      You received this message from the "vim_dev" 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_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Christian Brabandt
      Hi clime! ... Looks like a bug to me. However, I think, if you set wildcharm= you ... I agree, this is not really useful, without a wildmodevisual()
      Message 2 of 3 , Feb 13, 2013
      View Source
      • 0 Attachment
        Hi clime!

        On Mi, 13 Feb 2013, clime wrote:

        > With respect to this thread on so:
        > http://stackoverflow.com/questions/14842987/vim-wildmenu-move-into-subdirectory-with-a-different-key-than-down
        >
        > It seems like command-line mappings aren't interpreted in wildmenu
        > mode, and instead exit it and insert the 'wildchar' literally.
        >
        > Would it be possible to interpret these mappings and potentially add
        > wildmenuvisible() - a function analog to the pumvisible()?

        Looks like a bug to me. However, I think, if you set wildcharm=<Tab> you
        can make your mapping work:

        :set wildcharm=<Tab>
        :cnoremap <C-j> <DOWN><Tab>

        I agree, this is not really useful, without a wildmodevisual() function,
        so you could do:
        :cnoremap <expr> <C-j> wildmodevisible() ? "\<Down>\<Tab>" : "\<c-j>"

        Attached patch enables this. Probably needs a test, but not sure how.

        regards,
        Christian
        --
        Eine dumme, einfältige Frau ist ein Segen des Himmels.
        -- François Marie Voltaire

        --
        --
        You received this message from the "vim_dev" 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_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Ingo Karkat
        ... Thanks for the patch, Christian. This is certainly useful, also for other command-line mappings. I didn t know about wildcharm ; it looks to me that
        Message 3 of 3 , Feb 14, 2013
        View Source
        • 0 Attachment
          On 13-Feb-13 20:19:55 +0100, Christian Brabandt wrote:

          > Hi clime!
          >
          > On Mi, 13 Feb 2013, clime wrote:
          >
          >> With respect to this thread on so:
          >> http://stackoverflow.com/questions/14842987/vim-wildmenu-move-into-subdirectory-with-a-different-key-than-down
          >>
          >> It seems like command-line mappings aren't interpreted in wildmenu
          >> mode, and instead exit it and insert the 'wildchar' literally.
          >>
          >> Would it be possible to interpret these mappings and potentially add
          >> wildmenuvisible() - a function analog to the pumvisible()?
          >
          > Looks like a bug to me. However, I think, if you set wildcharm=<Tab> you
          > can make your mapping work:
          >
          > :set wildcharm=<Tab>
          > :cnoremap <C-j> <DOWN><Tab>
          >
          > I agree, this is not really useful, without a wildmodevisual() function,
          > so you could do:
          > :cnoremap <expr> <C-j> wildmodevisible() ? "\<Down>\<Tab>" : "\<c-j>"
          >
          > Attached patch enables this. Probably needs a test, but not sure how.

          Thanks for the patch, Christian. This is certainly useful, also for other
          command-line mappings.

          I didn't know about 'wildcharm'; it looks to me that making it equal to the
          'wildchar' value makes sense (and not setting it to an unused key as suggested
          by its help), so that one is able to record and replay stuff like :split
          ~/<Tab><Tab>foo.txt in a macro. I wonder why it's empty by default.

          -- regards, ingo

          --
          --
          You received this message from the "vim_dev" 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_dev" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+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.