sudo apt-get install build-essential libgtk2.0-dev
gcc -shared -o libsublime-imfix.so sublime_imfix.c `pkg-config --libs --cflags gtk+-2.0` -fPIC
sublime_text.sh
#!/bin/bash
sh -c "LD_PRELOAD=/home/eechen/apps/sublime_text_2/libsublime-imfix.so /home/eechen/apps/sublime_text_2/sublime_text"
sublime_text.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=sublime_text
Icon=/home/eechen/apps/sublime_text_2/Icon/48x48/sublime_text.png
Exec=sh -c "LD_PRELOAD=/home/eechen/apps/sublime_text_2/libsublime-imfix.so /home/eechen/apps/sublime_text_2/sublime_text"
Comment[zh_CN]=Sublime Text 2
Sublime Text 用户配置文件
Linux: ~/.config/sublime-text-2
Windows: %APPDATA%\Sublime Text 2
设置字体为DejaVu Sans Mono:
菜单Preferences - Settings User内容:
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"font_size": 12,
"font_face": "DejaVu Sans Mono"
}
Windows上右键快捷菜单注册表:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\OpenWithSublimeText]
@="Open with Sublime Text"
"Icon"="D:\\Sublime Text 2\\sublime_text.exe"
[HKEY_CLASSES_ROOT\*\shell\OpenWithSublimeText\command]
@="\"D:\\Sublime Text 2\\sublime_text.exe\" \"%1\""