Objective
Sublime is very useful, but Ubuntu can not input Chinese, this is a big problem. Do not know why the development has been not resolved, fortunately, there is a master in, always find a way. Many online methods, but also very messy, now I will own experience to summarize.
First of all, I refer to several articles, are pretty good, first listed:
- Sublime-text-imfix: First of all, this method is the simplest, but there are some problems on my system. This can be highly recommended with this
- The perfect solution for Linux under Sublime Text Chinese input: Speak more clearly, can also be used for reference.
- Ubuntu under Sublime Text 3 to resolve the inability to input Chinese method: The most clear explanation, suggest to see.
My way.
1. Download the files we need, open the terminal, enter:
clone https://github.com/lyfeyaj/sublime-text-imfix.git
2. Will besublmoved to/usr/bin/and will besublime-imfix.somoved to/opt/sublime_text/(Sublime's installation directory)
Terminal input:
cd ~/sublime-text-imfix
sudo cp ./lib/libsublime-imfix.so /opt/sublime_text/
sudo cp ./src/subl /usr/bin/
3. Use the command to try tosublstart the sublime, if the successful start, you should be able to input Chinese.
Terminal input:
LD_PRELOAD=./libsublime-imfix.so subl
4. But this can only be started with the command line above to enter Chinese, we need a simpler way, I choose to create a new shell script, very simple, just a word.
Sublime New file Input:
#!/bin/bash
LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so subl
Then save the file assublime(note: no suffix) and put it in the/homefolder.
5. So far, all the work has been done. To start, direct terminal input:bash ~/sublime, you can start sublime, and can input Chinese.
6. If you do not need to enter Chinese, just open it in the previous way. The purpose of the script file is to easily open the sublime that can input Chinese.
Description
This is only a stopgap, the perfect solution has not yet, can only wait for sublime developer update.
The so-called perfect solution, there are still problems, such as if you change the desktop shortcut, then sublimeBrowse Packagesfunction can not be used, of course, there are other problems. For normal use, I didn't change it. Of course, if you have more Chinese input, it is recommended to modify the desktop shortcut, after all, it will be more convenient, how specific, their choice.
In addition, the input method does not follow the box, temporarily no solution ah.
Wen/vaayne (author of Jane's book)
Original link: http://www.jianshu.com/p/bf05fb3a4709
Copyright belongs to the author, please contact the author to obtain authorization, and Mark "book author".
Fix Ubuntu under sublime Text 3 cannot input Chinese