jed-users mailing list

[2002 Date Index] [2002 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: moving the cursor in an expanded abrev


Joachim Schmitz <js@xxxxxxxxxxxxx> wrote:
>define_abbrev ("xml", "hha", "<a href=\"\"></a>\010");
>
>which inserts <a href=""></a>
>
>now I want the cursor to move inbetween the ""

You will have to write a function for that.  Perhaps you can write a
wrapper around "self_insert_cmd" such as:

define xml_insert_space ()
{
   call ("self_insert_cmd");
   if (bfind ("@"))
     del ();
}

define xml_mode_hook ()
{
  local_setkey ("xml_insert_space", " ");
}

And use an abbrev such as:

define_abbrev ("xml", "hha", "<a href=\"@\"></a>\010");

"@" may not be the best character for this.

--John

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2002 date index] [2002 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]