红联Linux门户
Linux帮助

Ubuntu下Emacs不能使用输入法的解决办法

发布时间:2015-02-16 15:22:43来源:linux网站作者:PfanAya

执行以下操作:

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即可。