一、从命令行启动
-
git clone https://github.com/lyfeyaj/sublime-text-imfix.git -
cd ~/sublime-text-imfix这里进入的从github下载下来的文件夹,我直接在主目录clone的,所以直接进入~/sublime-text-imfix
-
sudo cp ./lib/libsublime-imfix.so /opt/sublime_text/ -
sudo cp ./src/subl /usr/bin/
补充一句,测试一下,如果可以,就可以删除下载的文件了。
二、右键打开方式
此方式建立在上述方式上
-
sudo gedit /usr/share/applications/sublime_text.desktop内容如下
-
1 [Desktop Entry] 2 Version=1.0 3 Type=Application 4 Name=Sublime Text 5 GenericName=Text Editor 6 Comment=Sophisticated text editor for code, markup and prose 7 Exec=bash -c "LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so exec /opt/sublime_text/sublime_text %F" 8 Terminal=false 9 MimeType=text/plain; 10 Icon=sublime-text 11 Categories=TextEditor;Development; 12 StartupNotify=true 13 Actions=Window;Document; 14 [Desktop Action Window] 15 Name=New Window 16 Exec=bash -c "LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so exec /opt/sublime_text/sublime_text -n" 17 OnlyShowIn=Unity; 18 [Desktop Action Document] 19 Name=New File 20 Exec=bash -c "LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so exec /opt/sublime_text/sublime_text --command new_file" 21 OnlyShowIn=Unity;