PyIM Configuration
Installation and Configuration
Using Doom Emacs as an example. Configuration file packages.el:
(package! pyim)
Configuration file config.el:
(use-package! pyim
:init
(setq pyim-dicts
'((:name "default" :file "~/.config/emacs/pyim-dicts/pyim-bigdict.pyim")))
(setq default-input-method "pyim")
:config
(pyim-isearch-mode 1)
(setq pyim-default-scheme 'quanpin)
(setq pyim-page-length 5)
(define-key pyim-mode-map "." 'pyim-page-next-page)
(define-key pyim-mode-map "," 'pyim-page-previous-page))
Run doom sync.
Download the big dictionary.
Use C-\ to toggle the input method.
Regarding Termux
On Termux, there are issues with dictionary loading because the emacs-async package doesn’t work properly. Switch to an alternative backend:
(require 'pyim-dregcache)
(setq pyim-dcache-backend 'pyim-dregcache)