lyfeyaj / sublime-text-imfix

Fix Sublime Text 3 Input method problem (CJK words) under Ubuntu
938 stars 194 forks source link

修正只能在终端中打开才能输入中文问题 #10

Closed yx91490 closed 8 years ago

yx91490 commented 9 years ago

请参考百度经验这篇文章可以正常打开输入中文:http://jingyan.baidu.com/article/f3ad7d0ff8731609c3345b3b.html ,以下是引用的文字:

为了使用鼠标右键打开文件时能够使用中文输入,还需要修改文件sublime_text.desktop的内容。 命令:

sudo gedit /usr/share/applications/sublime_text.desktop

将[Desktop Entry]中的字符串

Exec=/opt/sublime_text/sublime_text %F

修改为

Exec=bash -c "LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so exec /opt/sublime_text/sublime_text %F"

将[Desktop Action Window]中的字符串

Exec=/opt/sublime_text/sublime_text -n

修改为

Exec=bash -c "LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so exec /opt/sublime_text/sublime_text -n"

将[Desktop Action Document]中的字符串

Exec=/opt/sublime_text/sublime_text --command new_file

修改为

Exec=bash -c "LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so exec /opt/sublime_text/sublime_text --command new_file"

注意:

修改时请注意双引号"",否则会导致不能打开带有空格文件名的文件。 此处仅修改了/usr/share/applications/sublime-text.desktop,但可以正常使用了。 opt/sublime_text/目录下的sublime-text.desktop可以修改,也可不修改。

lyfeyaj commented 8 years ago

fixed in #19