Modify repeat keys?
markert.michael at googlemail.com
Thu Aug 11 01:56:05 CEST 2011
Sorry I f*cked the mime types up.
here is my message again:
I'm using this function to exit insert state with jk
(use `(define-key evil-insert-state-map (cofi/maybe-exit ?j ?k))')
(defun cofi/maybe-exit (entry-char exit-char)
"Return a a function that maybe inserts or calls `evil-normal-state'.
Insert `ENTRY-CHAR', if it is followed by a `EXIT-CHAR' in the next half second,
delete `ENTRY-CHAR' and call `evil-normal-state''."
(let ((modified (buffer-modified-p)))
(let ((evt (read-event (format "Insert %c to exit insert state" ,exit-char)
((null evt) (message ""))
((and (integerp evt) (char-equal evt ,exit-char))
(t (setq unread-command-events (append unread-command-events
It works fine except for repeating insertions. I tried to modify
`evil-repeat-keys' before calling `evil-normal-state' — something
along the lines of
(setq evil-repeat-keys (append (butlast evil-repeat-keys) [escape]))
— but it didn't work and was greeted a `characterp' error.
I also tried to access the `evil-repeat-ring' after the call to
`evil-normal-state' but it was still empty.
So please help me out here: How can I modify the repeat keys
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 835 bytes
Desc: not available
Url : https://lists.ourproject.org/pipermail/implementations-list/attachments/20110811/43174fcb/attachment.pgp
More information about the implementations-list