DoomEmacs和EAF安装小白记录

* 中英文混打:OS输入法管理包 smart-input-source

由于经常要混合输入中英文,尤其使用的是evil模式。默认的输入分切换会非常不方便。参见(重新设计)中英文混打:OS输入法管理包 smart-input-source - #198,来自 goumao, 这个帖子安装sis包。会记忆你在输入模式的输入法,一旦ESC到normal模式则会自动切换到英文输入法,非常方便。

Doom emacs中安装的话, 在packages.el,写入下面代码。

(package! sis)

在config.el中写入,下面代码。我这里是Ubuntu linux系统,使用的是fcitx5输入法.

(use-package! sis
  ;; :hook
  ;; enable the /context/ and /inline region/ mode for specific buffers
  ;; (((text-mode prog-mode) . sis-context-mode)
  ;;  ((text-mode prog-mode) . sis-inline-mode))

  :config
  ;; For MacOS
  ;; (sis-ism-lazyman-config

  ;;  ;; English input source may be: "ABC", "US" or another one.
  ;;  ;; "com.apple.keylayout.ABC"
  ;;  "com.apple.keylayout.US"

  ;;  ;; Other language input source: "rime", "sogou" or another one.
  ;;  ;; "im.rime.inputmethod.Squirrel.Rime"
  ;;  "com.sogou.inputmethod.sogou.pinyin")
  (sis-ism-lazyman-config "1" "2" 'fcitx5)

  ;; enable the /cursor color/ mode
  (sis-global-cursor-color-mode t)
  ;; enable the /respect/ mode
  (sis-global-respect-mode t)
  ;; enable the /context/ mode for all buffers
  (sis-global-context-mode t)
  ;; enable the /inline english/ mode for all buffers
  (sis-global-inline-mode t)
  )

然后使用doom sync 安装就行。 安装注意:如果你使用了前面emacs --daemon. 需要重启一下系统,否则emacs会报错,找不到sis。

1 个赞