之前在ubuntu下一直使用中文输入法fcitx,总是感觉差了那么一点。于是决定尝试使用以下IBUS。
IBUS是什么?
IBUS (http://code.google.com/p/ibus/wiki/Ubuntu) - Intelligent Input Bus for Linux / Unix OS,基于c++。
1)按照官方指引一步步安装最新的1.3
$ sudo add-apt-repository ppa:shawn-p-huang/ppa
$ sudo apt-get update
$ sudo apt-get install ibus-gtk ibus-qt4 ibus-pinyin ibus-pinyin-db-open-phrase
or
$ sudo apt-get upgrade
$ im-switch -s ibus
Logout and re-login
2) 接下来,在顶部菜单 系统 - 系统管理 - 语言支持 中,将“键盘输入方式系统”设置为ibus,然后注销重新登录。
3)在语言支持中添加或者删除中选择简体中文,勾选组件中“输入法”的复选框。
4)在系统-》首选项-》IBUS 设置中,在输入法Tab中选择汉语-》拼音的输入法。
5)用CTRL-》space可切换输入法。
6)另外确保shell env的LANG为如下:
LANG=zh_CN.utf8
GDM_LANG=zh_CN.utf8
7)将set encoding=UTF-8加入./vimrc文件中。