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

Re: **SPAM** imap problem

Expand Messages
  • Antoine J. Mechelynck
    ... Change the function to return the thing-to-insert. Then use the expression register. =SomeFunction() (I haven t tested it.) HTH, Tony.
    Message 1 of 1 , Nov 27, 2003
      Ravi Shankar Sivaraman <rsivara1@...> wrote:
      > Hi,
      > I got some problems with imap.
      > I did a imap something like this :
      >
      > imap < <C-O>:call somefunction()
      >
      > When the user presses "<", this function gets called. According to
      > the user this is one single insert operation. But when he repeats the
      > previous insert (by pressing "."), only the text inserted by the
      > somefunction() is repeated. This is because of the <C-O> which
      > swichtes to command mode and executes the function and returns back
      > to insert mode. But I want the changes before the <C-O> and after
      > that to be available as one "previous" insert. How to do that? So to
      > the user it all looks like one insert operation, though there are two
      > successive insert operations are happening.
      > Or is it possible to call a function from insert mode itself(without
      > explicitly going to command mode), so that the "." can function
      > properly? I guess this should be a common problem with imap. Any help?
      > Regards,
      > - Ravi

      Change the function to "return" the thing-to-insert. Then use the expression
      register.

      <C-R>=SomeFunction()

      (I haven't tested it.)

      HTH,
      Tony.
    Your message has been successfully submitted and would be delivered to recipients shortly.