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. 如何让vue项目兼容IE浏览器

    一般来说项目开发到后期都需要做各种兼容性处理例如:360.IE9以上.QQ浏览器....等等 那么现在来介绍一个工具 babel-cli 跟 babel-preset-es2015 babel-cli ...

  2. 手写代码 - java.util.Arrays 相关

    1-拷贝一个范围内的数组 Arrays.copyOfRange( array, startIndex, endIndex); include startIndex... exclude endInde ...

  3. lucene学习的小结

    pom.xml设置 <dependency> <groupId>junit</groupId> <artifactId>junit</artifa ...

  4. Java基础7-异常;jar包

    昨日内容回顾 多态:多种状态,多态的前提条件是继承或者是实现 面向接口编程 降低耦合度 接口是最低标准,接口可以多重继承 接口中的所有方法都是抽象方法 抽象类中可以没有抽象方法 匿名内部类对象 将对类 ...

  5. PLSQL安装、PLSQL汉化、激活

    前言 新版PLSQL连接Oracle时,不需要Oracle客户端为32位了,安装完Oracle后也不需要在单独安装客户端. 一.准备工作 1.点击下载PLSQL,本次安装的PLSQL版本为12.0.7 ...

  6. 一文掌握 Linux 性能分析之内存篇

    本文首发于我的公众号 Linux云计算网络(id: cloud_dev),专注于干货分享,号内有 10T 书籍和视频资源,后台回复「1024」即可领取,欢迎大家关注,二维码文末可以扫. 前面我们已经学 ...

  7. php页面编码设置

    php的header来定义一个php页面为utf编码或GBK编码 php页面为utf编码 header("Content-type: text/html; charset=utf-8&quo ...

  8. 【原创】大数据基础之ORC(1)简介

    https://orc.apache.org Optimized Row Columnar (ORC) file 行列混合存储 层次结构: file -> stripes -> row g ...

  9. python正则表达式--编译正则表达式re.compile

    编译正则表达式-- re.compile 使用re的一般步骤是先将正则表达式的字符串形 式编译为pattern实例,然后使用pattern实例处理文本并获取匹配结果(一个Match实例(值为True) ...

  10. 关于 layer.mask = label.layer 出现空白情况

    源代码如下: self.numLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width/3, ...