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 now.
I’ve made this tutorial because there’s no installer for the Linux versions of Sublime Text. While that’s not a real problem, I feel there is a cleaner way to go around this. Also, this post will show you how to integrate Sublime Text to Unity (which, I’m glad to report, has now matured into a fully functional user interface).
So let’s get on with this. Here is my how to install Sublime Text on Ubuntu tutorial.
Step 1
Download the tarfile that suits you best and extract it. Here’s the command to extract tar.bz2 files:
1.
tar
xf Sublime\ Text\ 2.0.1\ x64.
tar
.bz2
You’ll notice that I got the 64-bit version. The reason is that it’s lightning fast. So, go for that if you can!
Step 2
You’ll get a “Sublime Text 2″ folder after extraction. This folder contains all the files that Sublime Text will need. So we have to move that folder somewhere more appropriate. Like the “/opt/” folder :
1.
sudo
mv
Sublime\ Text\ 2 /opt/
Step 3
At some point you’d want to be able to call Sublime Text from the Terminal by just typing “sublime”. To do that, we’ll just create a symbolic link in “/usr/bin” like thus:
1.
sudo
ln
-s /opt/Sublime\ Text\ 2/sublime_text /usr/bin/sublime
Step 4
Now that our files are at the right place, we need to create a launcher in Unity. To do this, we’re going to create a .desktop file in “/usr/share/applications”:
1.
sudo
sublime /usr/share/applications/sublime.desktop
And paste the following content:
01.
[Desktop Entry]
02.
Version=1.0
03.
Name=Sublime Text 2
04.
# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
05.
# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
06.
GenericName=Text Editor
07.
08.
Exec=sublime
09.
Terminal=
false
10.
Icon=/opt/Sublime Text 2/Icon/48x48/sublime_text.png
11.
Type=Application
12.
Categories=TextEditor;IDE;Development
13.
X-Ayatana-Desktop-Shortcuts=NewWindow
14.
15.
[NewWindow Shortcut Group]
16.
Name=New Window
17.
Exec=sublime -n
18.
TargetEnvironment=Unity
As you can see, these lines are quite straightforward. Go ahead and experiment a bit with them.
Step 5
Now you would probably want to open all text files with Sublime Text 2. The easiest way to do that is to open up the file associations list:
1.
sudo
sublime /usr/share/applications/defaults.list
And replace all occurrences of gedit.desktop with sublime.desktop.
Tada ! There you go. You now have Sublime Text 2 installed on Unity on Ubuntu 12.04, like a pro.
Here are some screenshots:
Under ubuntu 12.04,install sublime text 2的更多相关文章
- 新装ubuntu 12.04 , 使用技巧
*********************************************** 一.让Ubuntu 12.04开机默认进入命令行模式. 修改 /etc/default/grubGRUB ...
- Linux/Ubuntu 16.04 安装编辑器 Sublime Text 3
在ubuntu 16.04 系统上使用Sublime Text 3 编辑文本还是不错的, 先到官网下载安装包,链接:http://www.sublimetext.com/3 ,下载对应的版本,64位或 ...
- Ubuntu 16.04下指定Sublime Text 3 默认python编译版本
安装PackageResourceViewer插件 输入 Ctrl+Shift+P 输入install,选择Package Control: Install Package 选择PackageReso ...
- Ubuntu 16.04下安装sublime Text的插件
Sublime Text是什么: 它是一款具有代码高亮.语法提示.自动完成且反应快速的编辑器软件,不仅具有华丽的界面,还支持插件扩展机制,用她来写代码,绝对是一种享受.相比于难于上手的Vim,浮肿沉重 ...
- ubuntu 14.04 下试用Sublime Text 3
很多源代码都没有IDE支持的,尤其是开源的源代码.从github上下载的,很多也不用IDE.包括我自己公司的代码,基本都是脚本,也不用IDE.通常情况下,都是用notepad++.UE之类的文本编辑器 ...
- [置顶] 关于UBUNTU 12.04, 在THINKPAD E430C上WIFI连接不上的问题
今天,把自己的本本给格式化了,化分成两个大块,在一切都搞定了后,出现了一个问题,即WIFI连接不上,但可以搜索到WIFI的网络,开始以为自己手贱,是不是密码输入了,试了N多次,发现偶错了,不是手贱,看 ...
- 【菜鸟学习Linux】-第三章- Linux环境搭建-使用VMware9安装Ubuntu 12.04系统
上一步,我们安装了VMware9虚拟机,现在我们就是用它来安装Ubuntu12.04系统,至于Ubuntu是什么,我就不废话了,大家google一下,比我讲的清楚,好了,开始干活! Ubuntu官网下 ...
- Android 手机上安装并运行 Ubuntu 12.04
ubuntu.sh脚本的原地址变动了,导致下载不了,现在更新了网盘地址.小技巧:遇到一些下载失效的时候可以试一试p2p下载工具(如 easyMule.迅雷等)试一试,说不定有人分享过~* —————— ...
- Windows XP硬盘安装Ubuntu 12.04双系统图文详解
Windows XP硬盘安装Ubuntu 12.04双系统图文详解 Ubuntu 12.04 LTS版本于2012年4月26日发布,趁着五一放假,赶紧在自己的Windows XP的电脑上安装下Ubun ...
随机推荐
- 0x03 递归
这个东西好像在搞矩乘的时候用过?忘了 #include<cstdio> #include<iostream> #include<cstring> #include& ...
- POJ 3020 Hungary
一道建图题-- // by SiriusRen #include <cstdio> #include <cstring> using namespace std; #defin ...
- 压力测试工具 Tinyget
Tinyget 压力测试工具使用方法为:命令行切换到工具所在路径下,然后输入压力命令.如:tinyget -srv:localhost -uri:/FeaturedProdu1cts.aspx -th ...
- SpringBoot(九) ElasticSearch 全文检索
ElasticSearch ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口.Elasticsearch是用 ...
- C#中SQL参数传入空值报错解决方案
C#中的null与SQL中的NULL是不一样的,SQL中的NULL用C#表示出来就是DBNull.Value. 注意:SQL参数是不能接受C#的null值的,传入null就会报错. 下面我们看个例子: ...
- AARRR:互联网创业者一定要掌握的指标
创业公司如何做数据分析?网站分析工具里的指标千百种,到底要从哪些数据入手呢?除了流量跟转换率,还有哪些数据跟公司成长有关呢?或许可以从了解AARRR Metrics开始.AARRR Metrics是由 ...
- ZBrush中移动笔刷介绍
移动笔刷是ZBrush®笔刷中举足轻重的一项,利用移动笔刷可以实现移动顶点的功能,还能改变模型的某一个点和某一位置.本文内容向大家介绍ZBrush®中移动笔刷以便大家熟悉它的用法和特性. 移动笔刷 可 ...
- oracle中nvl函数用法
1.返回两个字段中非空字段的值,第一个字段非空,返回第一个字段的值,第二个字段值为null,则返回第二个字段的值,如果都为null 则返回null. select nvl(a,b) from tabl ...
- NOI 2011 阿狸的打字机 (AC自动机+dfs序+树状数组)
题目大意:略(太长了不好描述) 良心LOJ传送门 先对所有被打印的字符串建一颗Trie树 观察数据范围,并不能每次打印都从头到尾暴力建树,而是每遍历到一个字符就在Trie上插入这个字符,然后记录每次打 ...
- [luogu2513 HAOI2009] 逆序对数列 (计数dp)
题目描述 对于一个数列{ai},如果有iaj,那么我们称ai与aj为一对逆序对数.若对于任意一个由1~n自然数组成的数列,可以很容易求出有多少个逆序对数.那么逆序对数为k的这样自然数数列到底有多少个? ...