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

Re: Using as a leader key breaks 'Does not trigger the InsertLeave autocommand event'

Expand Messages
  • Ben Fritz
    ... I think the problem is that the OP DOESN T want the InsertLeave autocmd to fire, so he uses to exit insert mode. The docs say should exit
    Message 1 of 7 , Aug 1, 2012
    View Source
    • 0 Attachment
      On Wednesday, August 1, 2012 10:25:57 AM UTC-5, mattn wrote:
      > Sorry for top post. And sorry, I'm talking about this without making
      >
      > sure the behavour.
      >
      > I wonder why you are trying to get InsertLeave with nnoremap. I
      >
      > beleave that leader <c-c> afect to insert mode at the first. So I'm
      >
      > thinking it should be inoremap to do that.
      >
      >

      I think the problem is that the OP DOESN'T want the InsertLeave autocmd to fire, so he uses <C-C> to exit insert mode. The docs say <C-C> should exit insert mode without firing the autocmd. If I understand correctly, with <C-C> as part of the LHS of a *normal mode* mapping, exiting Insert mode with <C-C> DOES trigger the autocmd.

      I also confirm this behavior. I would expect that a <C-C> mapping in normal mode has no effect on behavior of insert mode, but in this case, it does.

      --
      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
    • Mikey
      ... That s exactly what I meant. -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to.
      Message 2 of 7 , Aug 1, 2012
      View Source
      • 0 Attachment
        On Aug 1, 5:37 pm, Ben Fritz <fritzophre...@...> wrote:
        > I think the problem is that the OP DOESN'T want the InsertLeave autocmd to fire, so he uses <C-C> to exit insert mode. The docs say <C-C> should exit insert mode without firing the autocmd. If I understand correctly, with <C-C> as part of the LHS of a *normal mode* mapping, exiting Insert mode with <C-C> DOES trigger the autocmd.

        That's exactly what I meant.

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