Linux operating system (8): Ubuntu16.04 install Sublime Text 3 Chinese input and solve problems

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/qq_41554005/article/details/100553896

Ubuntu16.04 install Sublime Text 3 Chinese input and solve problems

Install Sublime Text 3
to the official website to see https://www.sublimetext.com/3

I use a 64-bit Ubuntu 16.04, so click on the image above "64 Bit", you can download the appropriate tarball. For example, I downloaded here is sublime_text_3_build_3143_x64.tar.bz2.
  Then, we can install it into / opt directory, in fact, is the installation of so-called decompression friends ~

cd /opt
sudo tar jxvf /home/rudy/下载/sublime_text_3_build_3143_x64.tar.bz2

After unpacking finished, I found more than a "sublime_text_3" directory, look inside, found a "sublime_text" executable file. Try to execute it right

./sublime_text

Sure enough, I see the familiar friends ~ Sublime Text

And then improve it, we write SHELL script file named "subl", as follows:

#!/bin/sh
exec /opt/sublime_text_3/sublime_text "$@"

Then put it modify the permissions, and put it in / usr / bin directory.

chmod a+x subl
cp subl /usr/bin/

In this way, we can happily start with Sublime Text "subl" commands.

Verification file, click help break

—– BEGIN LICENSE —–
sgbteam
Single User License
EA7E-1153259
8891CBB9 F1513E4F 1A3405C1 A865D53F
115F202E 7B91AB2D 0D2A40ED 352B269B
76E84F0B CD69BFC7 59F2DFEF E267328F
215652A3 E88F9D8F 4C38E3BA 5B2DAAE4
969624E7 DC9CD4D5 717FB40C 1B9738CF
20B3C4F1 E917B5B3 87C38D9C ACCE7DD8
5F7EF854 86B9743C FADC04AA FB0DA5C0
F913BE58 42FEA319 F954EFDD AE881E0B

—— END LICENSE ——

Chinese input problem solving
  thought this article would end this way, but with a bit after this Sublime Text, and found that actually I can not even enter the Chinese! Sogou input method installed on Ubuntu does not work, love the motherland and Chinese how can baby accept it!?
  here we have to break this problem step by step.
  here we use something called "sublime-imfix", you can get a git.

 git clone https://github.com/lyfeyaj/sublime-text-imfix.git

Downloaded, and then decompressed into the directory, and the copy libsublime-imfix.so lib directory to the install directory Sublime Text before.

cd sublime-text-imfix
sudo cp ./lib/libsublime-imfix.so /opt/sublime_text_3/

Modify / usr / bin / subl, as follows:

#!/bin/sh
export LD_PRELOAD=/opt/sublime_text_3/libsublime-imfix.so
exec /opt/sublime_text_3/sublime_text "$@"

Save and exit, well, it should now be entered in Sublime Text 3 ~ Chinese

[Image dump outer link failure (img-t7M7yi5L-1567652347433) (https://i.loli.net/2018/12/17/5c1777059f98c.png)]

Guess you like

Origin blog.csdn.net/qq_41554005/article/details/100553896