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

38560Re: Delay when Insert mode is left

Expand Messages
  • Jens Paulus
    Jan 10, 2005
    • 0 Attachment
      Hi Bram,

      On Mon, Jan 10, 2005 at 19:14:53 +0100, Bram Moolenaar wrote:
      > > Let me ask a little question. When being in command line I am looking
      > > for a way to figure out if the command line has been entered from Visual
      > > mode or from Normal mode. Neither visualmode() nor mode() help because
      > > the first one is for something else and the second one does not react
      > > how I want it.
      > You need to use another method. For example by using ":vmap" or
      > invoking mode() before leaving Visual mode.

      yes I know, but it seems impossible to invoke mode() before leaving
      Visual mode. To invoke mode() it requires that a function call from the
      command line is done and this always deliveres the information that
      Normal mode is the current mode, also if the last mode was Visual mode.
      The reason I want to know what the previous mode was is because I create
      a function that makes changes on the text depending on if the text was
      from a visual selection or if a range was specified.

      Best regards

    • Show all 14 messages in this topic