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. 可变与不可变类型数据,列表的copy方法

    我们先来了解一下可变与不可变类型的数据 (1)可变类型:列表,字典(内存中的数据允许被修改) 不可变类型:数字,字符串,元组(内存中的数据不允许被修改) 接着我们通过一个实例来看一看可变与不可变类型数 ...

  2. 分布式系列四: HTTP及HTTPS协议

    分布式系列四: HTTP及HTTPS协议 非常全面的一篇HTTP的文章: 关于HTTP协议,一篇就够了 还有一个帮助理解HTTPS的文章: 也许,这样理解HTTPS更容易 本文的一些描述摘自这篇文章 ...

  3. L2-002 链表去重 (25 分) (模拟)

    链接:https://pintia.cn/problem-sets/994805046380707840/problems/994805072641245184 题目: 给定一个带整数键值的链表 L, ...

  4. Python Libhunt

    有一个网站,Python Libhunt: https://python.libhunt.com 这个网站类似于Github的Awesome xxx系列,不过它是随时更新的,排序方式,分类也更加友好. ...

  5. 响应式bootstrap - demo

    参考资料: bootstrap:http://www.bootcss.com/ 汤姆大叔的博客: <深入理解Bootstrap>http://item.jd.com/11462962.ht ...

  6. 【原创】大叔经验分享(26)hive通过外部表读写elasticsearch数据

    hive通过外部表读写elasticsearch数据,和读写hbase数据差不多,差别是需要下载elasticsearch-hadoop-hive-6.6.2.jar,然后使用其中的EsStorage ...

  7. 在浏览器中查看.vue文件的源码

  8. jdbc连接sqlserver,mysql,oracle

    class xxx{ private static String port = "1433"; private static String ip = "192.168.2 ...

  9. robot framework 上个用例的输出作为下个用例的输入 (Set Global Variable的用法)

    变量的作用域 通常情况下,每个变量默认都是局部变量. 一个case里的变量,作用域在这个case内部: 一个userkeyword里的变量,作用域在这个userkeyword内部: 一个文件型suit ...

  10. 校验XX是否在有效期内

    简单介绍:做删除的时候,需要判断XX的日期,如果在有效期内,则不能删除,已过期,或者是未生效都可以删除.刚看到的时候,就有点懵逼了,因为不知道该怎么判断,最初,想的是查询XX的开始日期和截止日期,看看 ...