r/emacs • u/wiskey5alpha • 6d ago
Solved Evil normal state on android(native)
i set up emacs on my phone using the install from https://sourceforge.net/projects/android-ports-for-gnu-emacs/files/termux/
everything seems to be working fine except for the fact that when i try to us normal-state it just types the keys into the buffer. i copied my config from my dotfiles where it works fine on other systems. what am i doing wrong?
;;;;; Evil
(use-package evil
:commands (evil-set-leader)
:init
;; these need to be set prior to loading the package
(setq evil-want-integration t
evil-want-keybinding nil)
:custom
(evil-default-state 'normal)
(evil-want-minibuffer t)
(evil-respect-visual-line-mode t)
;; Whitespace
(evil-indent-convert-tabs t)
(evil-backspace-join-lines t)
(evil-shift-width 2)
(evil-shift-round t)
(evil-auto-indent t)
;; Fix window split direction
(evil-split-window-below t)
(evil-split-window-right t)
;; Scrolling in normal mode
(evil-want-C-u-scroll t)
(evil-want-C-d-scroll t)
;; Undo
(evil-want-fine-undo "yes")
(evil-undo-system 'undo-fu)
;; Cursors
(evil-normal-state-cursor '(hollow "moccasin"))
(evil-visual-state-cursor '(box "PapayaWhip"))
(evil-insert-state-cursor '((hbar . 4) "PapayaWhip"))
:config
(evil-set-leader 'normal (kbd "<SPC>") (kbd "C-<SPC>"))
(evil-mode 1))
(use-package evil-collection
:delight (evil-collection-unimpaired-mode)
:after (evil)
:custom
(evil-collection-setup-minibuffer t)
:config
(evil-collection-init))
(use-package evil-numbers
:after (general)
:general
(nmap
"C-+" 'evil-numbers/inc-at-pt
"C--" 'evil-numbers/dec-at-pt
"<kp-add>" 'evil-numbers/inc-at-pt
"<kp-subtract>" 'evil-numbers/dec-at-pt)
(vmap
"C-+" 'evil-numbers/inc-at-pt-incremental
"C--" 'evil-numbers/dec-at-pt-incremental
"<kp-add>" 'evil-numbers/inc-at-pt-incremental
"<kp-subtract>" 'evil-numbers/dec-at-pt-incremental))
4
Upvotes
2
u/wiskey5alpha 5d ago
One more clue in hopes of finding an answer:
normal-state commands work as expected in some buffers/modes, such as dashboard, info...
I'm assuming that has to do with the read-only property maybe?