1. download sublime_text_3_build_3176_x86.tar.gz from http://www.sublimetext.com/3

2. extract it to /opt/sublime_text_3

3. then we can run sublime from shell:

cd /opt/sublime_text_3

./sublime_text

4. register sublime

#add the following lines into /etc/hosts or C:/windows/system32/driver/etc/hosts for windows

127.0.0.1  www.sublimetext.com

127.0.0.1  license.sublimehq.com

#then use the license key

----- 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 ------

5. fix Chinese input issue

#1 downloade sublime-text-imfix-master.zip from https://github.com/lyfeyaj/

#2 copy sublime-text-imfix-master/lib/libsublime-imfix.so to /opt/sublime_text_3/

#3 create a launcher proxy for sublime_text

vi /usr/bin/subl

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

chmod 755 /usr/bin/subl

Then you can run sublime with subl and input Chinese characters.

6. modify sublime_text.desktop so that sublime run through desktop icon  supports Chinese charachers input.

[Desktop Entry]

...

Exec=bash -c "LD_PRELOAD=/opt/sublime_text_3/libsublime-imfix.so /opt/sublime_text_3/sublime_text %F"

[Desktop Action Window]

...

Exec=bash -c "LD_PRELOAD=/opt/sublime_text_3/libsublime-imfix.so /opt/sublime_text_3/sublime_text -n"

[Desktop Action Document]
...
Exec=bash -c "LD_PRELOAD=/opt/sublime_text_3/libsublime-imfix.so /opt/sublime_text_3/sublime_text --command new_file"

7. Creat dock item for sublime_text

#1 copy sublime_text.desktop to /usr/share/applications/

#2 modify icon path as

Icon=/opt/sublime_text_3/Icon/32x32/sublime_text.png

#3 start sublime

subl

then will can find it's icon on dock bar. Right click it we can see "keep in Dock" option.

[Mark]

For elementary or ubuntu,

Directory /usr/shar/applications includes all desktop configure files.

But for every user items in ~/.config/plank/dock1/launchers are really shown on dock bar.

However, we can't create a similar item in this directory directly.

If an application's desktop file are copied to /usr/share/applications we can dock it to dock bar by right clicking the icon. Otherwise, you can't find the related operation.

Install sublime text for elementary os的更多相关文章

  1. Under ubuntu 12.04,install sublime text 2

    Sublime Text is an awesome text editor. If you’ve never heard of it, you should check it out right n ...

  2. Sublime Text 2 (for OS X )配置成可以运行基于python3解释器的 .py文件

    Mac自带的python 其version是python 2.7 官网下的Sublime Text 2部署好了以后默认也是 为了使ST2 可以在command+B时可以运行基于python3的.py, ...

  3. Install Sublime Text 3

    $ sudo add-apt-repository ppa:webupd8team/sublime-text-3 $ sudo apt-get update $ sudo apt-get instal ...

  4. [Sublime Text] How to Install Sublime Text on Ubuntu

    For Sublime-Text-2: sudo add-apt-repository ppa:webupd8team/sublime-text- sudo apt-get update sudo a ...

  5. install chrome in elementary os

    Elementary OS Freya 0.3.2 was officially out for public. As previous release, it comes pre-installed ...

  6. Ubuntu安装Sublime Text 3

    终端命令行安装: Install the GPG key: wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo a ...

  7. CodeAtlas For Sublime Text

    CodeAtlas is a plugin of SublimeText, which allows one to explore the call graph conveniently. The p ...

  8. kali linux 2.0安装sublime text 2

    第一种方法:Download the Sublime Text 2 & Extract it:32位:$ wget http://c758482.r82.cf2.rackcdn.com/Sub ...

  9. install sublime for linux

    Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators Python API, that available f ...

随机推荐

  1. 第六节,Python的科学计算包——Numpy

    1.基本类型(array) import numpy as np a=[1,2,3,4] b=np.array(a) #array([1,2,3.4]) type(b) #<type 'nump ...

  2. C#学习笔记-XML的读写(一)

    需要解析的配置XML <?xml version="1.0" encoding="utf-8" ?> <configurations> ...

  3. [Linux容器]当我们谈容器的时候,我们在谈什么

    Docker在当下很火,那么,当我们谈Docker,谈容器的时候,我们在谈什么? 或者说,你对Docker,对容器了解吗?容器,到底是怎么一回事儿? 这篇文章着重来讲一下Linux容器,为什么强调Li ...

  4. poj 2155 matrix 二维线段树 线段树套线段树

    题意 一个$n*n$矩阵,初始全为0,每次翻转一个子矩阵,然后单点查找 题解 任意一种能维护二维平面的数据结构都可以 我这里写的是二维线段树,因为四分树的写法复杂度可能会退化,因此考虑用树套树实现二维 ...

  5. 【原创】大叔问题定位分享(20)hdfs文件create写入正常,append写入报错

    最近在hdfs写文件的时候发现一个问题,create写入正常,append写入报错,每次都能重现,代码示例如下: FileSystem fs = FileSystem.get(conf); Outpu ...

  6. nohup + & 保证服务后台运行不中断

    nohup和&后台运行,进程查看及终止   1.nohup 用途:不挂断地运行命令. 语法:nohup Command [ Arg … ] [ & ] 无论是否将 nohup 命令的输 ...

  7. linux命令进阶

    Though unconsciously,peple are indeed moving towards their destination.Slow as the progress seen fro ...

  8. windows 查看端口占用,杀进程

    查看 443端口占用 netstat -ano | findstr "443" ,得到如下信息: TCP [::]:443 [::]:0 LISTENING 2320 发现是被23 ...

  9. 如何手写Ajax实现异步刷新

    所谓的异步刷新,就是不刷新整个网页进行更新数据. 只有通过js才能实现Ajax,进而实行异步刷新 表单提交数据和Ajax提交数据的区别:表单提交是提交的整个页面中的数据,提交数据之后会抛弃之前的页面( ...

  10. Mac 常用的快捷键

    Mac 菜单和键盘通常对某些按键使用符号,其中包括以下修饰键: Command(或 Cmd)⌘ Shift ⇧ Option(或 Alt)⌥ Control(或 Ctrl)⌃ Caps Lock ⇪ ...