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

Re: in Visual mode with 'insertmode' set

Expand Messages
  • Bram Moolenaar
    ... A typed CTRL-C works differently from a CTRL-C in a mapping. When typed it s used to interrupt and cancel a command. In a mapping you don t need to
    Message 1 of 2 , Feb 29, 2004
    • 0 Attachment
      Benji Fisher wrote:

      > If I have 'insertmode' set, enter Insert-Visual mode (with <C-O>V,
      > for example), and type <C-C>, what is supposed to happen? If I type it
      > directly, I seem to go into Insert mode. If I use it through a mapping,
      > such as
      >
      > :vmap <F5> <C-C>:echo "foo"<CR>
      >
      > then I seem to end in Insert-Normal mode, with "foo" echoed at the
      > command line.

      A typed CTRL-C works differently from a CTRL-C in a mapping. When typed
      it's used to interrupt and cancel a command. In a mapping you don't
      need to interrupt, but cancelling a command still works.

      It's strange that you go back to Normal mode while 'insertmode' is set.
      When using <Esc> instead of <C-C> Vim returns to Insert mode after
      typing one character. Hmm...

      --
      CONCORDE: Message for you, sir.
      He falls forward revealing the arrow with the note.
      "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
      \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
    Your message has been successfully submitted and would be delivered to recipients shortly.