Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Xiaoquan Kong howl-anderson

I may be slow to respond.
View GitHub Profile
howl-anderson / .spacemacs
Last active Mar 13, 2020
Automatically switch to English keyboard when leaving insert/replace mode in Evil of Spacemacs. And when you enter insert/replace mode again, switch to whatever input method you used last time. Especially useful when you are using other language (non-english) to write content.
View .spacemacs
(defun dotspacemacs/user-config ()
(setq shell-file-name "/bin/bash")
; set default var lang_source for ibus arg
(setq lang_source "xkb:us::eng")
; what we do when enter insert mode
(add-hook 'evil-insert-state-entry-hook
(lambda ()
(shell-command (concat "ibus engine " lang_source))))