I. Preface
In Windows, sublime is used as the editor. Who knows that sublime in Linux does not take care of Chinese users so much? After finding N for a long time, I finally found a poor solution, so I decided to join the vim camp.
Ii. struggling to make sublime support Chinese Input
1. Install
[A]. Download the binary compressed package sublime text 2.0.2 x64.tar.bz2 from the official website.
[B]. PassTar-jxvf sublime text2.0.2X64.tar.bz2Decompress the package to the current directory.
[C]. PassMV sublime \ Text \2.0.2\ X64/usr/lib/sublimeCut the sublime directory to/usr/lib/sublime
[D]. PassLn-S/usr/lib/sublime/sublime_text/usr/bin/sublimeCreate soft link
2. Start error reporting.
When you enter sublime to start the program, the following exception is reported:
G_dbus_connection_real_closed: Remote peer vanished with error: underlying giostream returned 0 bytes on an async read (G-io-error-Quark, 0). exiting.
This is a matter of privilege escalation.
SuYou can only switch to the administrator user permission without using the administrator login script and search path.
Su-Not only can I switch to the Administrator permission, but also use the administrator login script and search path
The obvious feature is that when Su is used for elevation of permission, #> pwd returns the Home Directory of the original user. When Su-elevation of permission is used, #> pwd returns the root home directory.
UseSu-After elevation of permissionSublimeStart the program.
3. Desktop shortcuts
Add a/usr/share/applications/sublime. desktop file and enter the following content.
[Desktop entry]
Version = 2.0.2
Name = sublime text 2
# Only KDE 4 seems to use genericname, So we reuse the KDE strings.
# From Ubuntu's language-pack-KDE-XX-base packages, version 9.04-20090413.
Genericname = text editor
Exec = sublime
Terminal = false
Icon =/opt/sublime text 2/icon/48x48/sublime_text.png
Type = Application
Categories = texteditor; ide; Development
X-ayatana-desktop-shortcuts = newwindow
[Newwindow shortcut Group]
Name = new window
Exec = sublime-n
Targetenvironment = unity
4. Chinese Input of egg pain
[A]. Install the "wenquanyi" font
Yum install xfonts-wqy
[B]. Configure "Settings-user"
Click preferences-> Settings-user and add the following content
"Font_face": "wenquanyi micro Hei mono"
[C]. sublime text 2 plugin inputhelper
Cd ~ /. Config/sublime-text-2/Packagesgit clone https://Github.com/xgenvn/inputhelper.git
Now press Ctrl + Shift + Z on sublime to open a Chinese input box. After the input is complete, press enter to insert Chinese to the document edited by sublime, sorry ......
Reference: http://www.icultivator.com/p/4935.html
Iii. Summary
In general, sublime in Linux is disappointing to me, but I can only blame myself for not having enough English skills. Now I plan to use Vim as my text editor. I will record the learning process of VIM later!
Respect Original, reprinted please indicate from: http://www.cnblogs.com/fsjohnhuang/p/3911421.html ^_^ fat Zi John