Here is a working implementation of some of the vi's text delete
functionality.  Future posting can refer to this example (good or bad)
if needed.
(Unindented lines are node headlines, indented lines are the body text
of the node)

@shortcuts vi key mappings
   enter-vi-delete-mode ! all = d

@mode vi-delete
   --> set-silent-mode
   --> mode-help
   enter-vi-delete-line-mode = d
   enter-vi-delete-to-end-of-word-mode = w
   enter-vi-delete-to-begin-of-word-mode = b

@mode vi-delete-line
   --> set-silent-mode
   --> forward-char   #Insure beginning-of-line stays on same line
   --> beginning-of-line   #Deleted text to clipboard
   --> end-of-line-extend-selection
   --> copy-text
   --> kill-line   #Delete line's text
   --> kill-line   #Delete empty line
   exit-named-mode

@mode vi-delete-to-end-of-word
   --> set-silent-mode
   --> insert-newline   #Split word so kill-word only deletes first
part
   --> keyboard-quit
   --> kill-word
   --> back-char        #Restore split line
   --> delete-char
   exit-named-mode

@mode vi-delete-to-begin-of-word
   --> set-silent-mode
   --> insert-newline   #Split word so kill-word only deletes first
part
   --> keyboard-quit
   --> back-word        #Problem: doesn't stop at beginning of line
   --> keyboard-quit    #Fix: back-word returns in command mode with
wrong background color
   --> kill-word
   --> delete-char      #Restore split line
   --> exit-named-mode

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to