On Aug 13, 1:26 am, Sam Hartsfield <[email protected]> wrote:
> First, Ctrl-Backspace and Ctrl-Delete. I didn't realize how much I
> used these until they stopped working like I expected. I found the
> "kill-word" and "backward-kill-word" commands by looking in
> leoSettings.leo, but it seems to leave behind punctuation characters
> and whitespace. I tried to think of how this would be useful, but
> didn't come up with anything. Perhaps someone could explain? Are other
> people simply not used to Ctrl-Backspace the way I am?
I finally got something basic working. It's not particularly
"smart" (and I'm undecided as to whether I want it to be), but it
seems to work more or less in the same way as most editors. I used the
word "delete" instead of kill, since it shouldn't copy deleted text to
the kill ring / clipboard. It calls the code used by Ctrl- arrow keys
for word movement.
I think it would be reasonable for something like this to be the
default behavior, bound to Ctrl-Backspace and Ctrl-Delete. Maybe I'm
underestimating its popularity, but this seems to be present in the
majority of editors. Any opinions one way or the other?
I'd appreciate any comments on the code, if I didn't do something in
the proper Leo way (seems likely). From Chapter 7 (Scripting) I
thought I should use beforeChangeNodeContents, but that didn't work
correctly.
I wasn't sure where to put the code, so I stuck it on the Leo wiki
(this was one recommendation from earlier postings):
http://leo.zwiki.org/StandardCtrlBackspaceAndCtrlDelete
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.