Is it possible to rebind digits. That, for example, "5" is "$", and "%" is "5"?
In evil-maps.el digits are defined like this.
(define-key evil-motion-state-map "1" 'digit-argument)
(define-key evil-motion-state-map "2" 'digit-argument)
...
I tried the answer of @ChillarAnand
(add-hook 'evil-mode-hook 'evil-mode-bindings)
(defun evil-mode-bindings ()
"Bind symbols to digits."
(define-key key-translation-map (kbd "%") "5")
(define-key key-translation-map (kbd "*") "8")
)
(define-key evil-normal-state-map "5" 'evil-beginning-of-line)
(define-key evil-normal-state-map "8" 'evil-end-of-line)
But Shift-5
still does not behave like 5
, the same is true for 8
.
Is it possible to fix it for the config above?
The same stands for @tarblet solution.
What I use as a test is a sequence Shift-5
, G
.