|
Swap characters
[Back]
Swaps the character at the cursor postion, and
the next character to the right. The if statement emulates the
emacs feature.
if (search("$", $cursor, "regex") == $cursor)
{
backward_character()
backward_character()
}
c = get_character($cursor)
delete_next_character()
forward_character()
insert_string(c)
This new version transposes the chars on either side of
the cursor instead of the next two:
if (search("^", $cursor, "regex") != $cursor) {
backward_character()
c = get_character($cursor)
delete_next_character()
forward_character()
insert_string(c)
backward_character()
}
else
beep()
[Back]
Released on Wed, 21 Nov 2001
by
C. Denat
|
|