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

38587Re: Delay when Insert mode is left

Expand Messages
  • Jens Paulus
    Jan 11, 2005
    • 0 Attachment
      Hi Antoine,

      On Tue, Jan 11, 2005 at 07:03:44 +0100, Antoine J. Mechelynck 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.
      > >
      > If it was from a visual selection, then a range was specified; and that
      > range is '<,'>

      yes, but this range could also have been entered manually in the command
      line to specify a range. And from inside a function it is unknow how the
      range was specified, only the start and end of it is known.

      Best regards

    • Show all 14 messages in this topic