Hi Erik,
> I've got a handful that I've just inserted into the main loop, but
> that seems less than ideal.
Right.
> It would become a lot of copying and pasting to try
> to keep my tweaks in sync with VIP as you continue to develop it.
>
> Would it be possible to have a slot in the loop for user-defined key
> mappings?
> I imagine defining them in '.viprc':
>
> (de user-key-map ()
> (quote
> ("^u" ...) # half page up
> ("^d" ...) # half page down
> ... ) )
>
> (de user-g-key-map () ...)
>
> And then in the main loop somewhere:
>
> ...
> ("$" ...)
> ("Z" ...)
> ~(user-key-map)
> ("g"
> ...
> ~(user-g-key-map) )
A read-macro is not useful here, because viprc is loaded later (or not at all if
non-existent).
More pil-style is perhaps
(de *KeyMap
("^u" ...) # half page up
("^d" ...) # half page down
and
(de *KeyMap-g
...
(de *KeyMap-q
...
which are then 'assoc'ed in the proper places in the main loop.
What do you think?
> > ("@" (evCmd (get (: buffer text) (: posY) (: posX))))
> > (...
> And it looks like that's what 'posChar' is for. It's all coming together now
Ah, indeed! I completely forgot about that one :)
☺/ A!ex
--
UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe