/ 中存储网

告诉你Ubuntu下Emacs不能使用输入法的解决办法的方法及命令

2015-03-25 00:00:00 来源:中存储网

执行以下操作:

sudo add-apt-repository ppa:irie/elisp

sudo apt-get update

and install ibus-el package:

sudo apt-get install ibus-el

emacs配置相关文件中加

(require 'ibus)

;; Turn on ibus-mode automatically after loading .emacs

(add-hook 'after-init-hook 'ibus-mode-on)

;; Use C-SPC for Set Mark command

(ibus-define-common-key ?C-s nil)

;; Use C-/ for Undo command

(ibus-define-common-key ?C-/ nil)

;; Change cursor color depending on IBus status

(setq ibus-cursor-color '("red" "blue" "limegreen"))

;; Use s-SPC to toggle input status

(global-set-key (kbd "s-SPC") 'ibus-toggle)

重启emacs

M-x ibus-enable即可。