Since we are running short of keys, it may be the time to add those
fancy compound keybindings (as with emacs, C-x r s a => Register Store
A).

What are those anyway? They are just very short *minibuffer commands*
(think alt-x rsa).

Se maybe we should just define one key that evokes minibuffer, parses
the input and forwards the command to appropriate handler. Let's say
it was ctrl+Q (q for "quick"). To store something in register a, you
type ctrl+q rsa ENTER. We probably should attempt skipping ENTER if
the command is complete already (e.g. by analysing the current entry
on every keystroke in that minibuffer).

Emacs often uses ctrl+x and ctrl+c, but we should avoid those because
they are standard CUA keys for cut & copy.

The minibuffer entry analysis can be thought as simple state machine.
entering ctrl+q puts it in state "init", r in state "r", "s" in state
"rs". "rs" is annotated with ('register-store', "LETTER_ARG_NEEDED"),
which will eat up the next character and invoke register_store(char).
We can probably skip the state machine theory for the most parts
though.

Command binding could be declared with:

'ri' : ('register-insert', ("LETTER_ARG_NEEDED",)

'rk' : ('rectangle-kill', )

'fs' : ('file-save', ("FILENAME_NEEDED",)

This state map easily allows us to analyze when we are ready to accept
arguments. We can also easily show 'register-insert: enter letter' in
statusbar.


-- 
Ville M. Vainio
http://tinyurl.com/vainio

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