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

cmap does't work to quit command line

Expand Messages
  • Britton Kerin
    I try to make always mean make the current thing go away but this doesn t work for making the command line go away with cmap. Pushing Esc does so I
    Message 1 of 4 , Mar 23, 2013
    • 0 Attachment
      I try to make <C-q> always mean 'make the current thing go away' but
      this doesn't work for making the command line go away with cmap.

      Pushing Esc does so I don't see why the map in the subject doesn't.
      It does do something though, it changes from just putting a carrot
      on the command line and flickering the cursor to giving an error:

      E492: Not an editor command: (whatever was on command line)

      Any ideas?

      Thanks,
      Britton

      --
      --
      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.
    • Tim Chase
      ... What are your cpoptions set to? Most importantly, do they contain x ? As detailed at ... either the use of in a macro, or if x is present in
      Message 2 of 4 , Mar 23, 2013
      • 0 Attachment
        On 2013-03-23 09:35, Britton Kerin wrote:
        > I try to make <C-q> always mean 'make the current thing go away' but
        > this doesn't work for making the command line go away with cmap.
        >
        > Pushing Esc does so I don't see why the map in the subject doesn't.
        > It does do something though, it changes from just putting a carrot
        > on the command line and flickering the cursor to giving an error:
        >
        > E492: Not an editor command: (whatever was on command line)

        What are your 'cpoptions' set to? Most importantly, do they contain
        "x"? As detailed at

        :help c_<esc>
        :help cpo-x

        either the use of <esc> in a macro, or if "x" is present in
        'cpoptions', it will treat it as an "execute this".

        It's not a default, so I'd suspect that you've manually set
        it somewhere in your vimrc chain.

        Additionally, using control+Q can sometimes be intercepted as one of a
        terminal's flow-control pairings (usually control+S stops flow,
        control+Q resumes flow), so in some environments, Vim may never see
        the control+Q.

        -tim


        --
        --
        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.
      • Christian Brabandt
        Hi Tim! ... When mapping in command mode, Vim will always behave as if x is present in cpo . I would consider this a bug and have already provided a
        Message 3 of 4 , Mar 23, 2013
        • 0 Attachment
          Hi Tim!

          On Sa, 23 Mär 2013, Tim Chase wrote:

          > On 2013-03-23 09:35, Britton Kerin wrote:
          > > I try to make <C-q> always mean 'make the current thing go away' but
          > > this doesn't work for making the command line go away with cmap.
          > >
          > > Pushing Esc does so I don't see why the map in the subject doesn't.
          > > It does do something though, it changes from just putting a carrot
          > > on the command line and flickering the cursor to giving an error:
          > >
          > > E492: Not an editor command: (whatever was on command line)
          >
          > What are your 'cpoptions' set to? Most importantly, do they contain
          > "x"? As detailed at
          >
          > :help c_<esc>
          > :help cpo-x
          >
          > either the use of <esc> in a macro, or if "x" is present in
          > 'cpoptions', it will treat it as an "execute this".
          >
          > It's not a default, so I'd suspect that you've manually set
          > it somewhere in your vimrc chain.
          >
          > Additionally, using control+Q can sometimes be intercepted as one of a
          > terminal's flow-control pairings (usually control+S stops flow,
          > control+Q resumes flow), so in some environments, Vim may never see
          > the control+Q.

          When mapping <esc> in command mode, Vim will always behave as if 'x' is
          present in 'cpo'. I would consider this a bug and have already provided
          a patch 2 years ago, but nobody ever responded:
          https://groups.google.com/d/msg/vim_use/8Mhs9spyzCM/qEFr6AFshWcJ

          regards,
          Christian
          --
          Wir bewältigen unseren Alltag fast ohne das geringste Verständnis der
          Welt.
          -- Carl Sagan

          --
          --
          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.
        • Ben Fritz
          ... But, you can use instead to cancel without executing. -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply
          Message 4 of 4 , Mar 24, 2013
          • 0 Attachment
            On Saturday, March 23, 2013 2:36:27 PM UTC-5, Christian Brabandt wrote:
            > Hi Tim!
            >
            > When mapping <esc> in command mode, Vim will always behave as if 'x' is
            > present in 'cpo'.

            But, you can use <C-C> instead to cancel without executing.

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