您的位置:首页 > 运维架构 > Linux

linux 下的sublime

2013-11-11 11:42 399 查看
Sublime Text 2 的安装 :

官方网站下载Linux版本 Or 执行 # wget http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.1.tar.bz2
得到一个“.tar.bz2”格式的压缩文件

进行解压,并把解压包放到:# mv /home/aneek/Downloads/Sublime_Text_2/ /opt/Sublime_Text_2

创建shotcut: (1)# touch /usr/bin/sublime

(2)# chmod 755 /usr/bin/sublime

(3)#vim /usr/bin/sublime

(4)把下面的复制到 sublime 并保存。

[plain] view plaincopy

#!/bin/sh

export SUBLIME_HOME=”/opt/Sublime_Text_2″

$SUBLIME_HOME/sublime_text $*


5.创建桌面图标: (1)vi /usr/share/applications/sublime.desktop

(2)把下面的复制到 sublime.desktop
并保存。

[plain] view plaincopy

<p>[Desktop Entry]</p><p>Name=Sublime Text 2</p><p>Comment=Sublime Text 2</p><p>Exec=<span style="color:#888888;"><span style="text-decoration: underline;">/home/john/Applications/</span></span>"Sublime Text 2"/sublime_text</p><p>Icon=/<span style="text-decoration: underline;"><span style="color:#888888;">home/john/Applications/</span></span>Sublime Text 2/Icon/48x48/sublime_text.png</p><p>Terminal=false</p><p>Type=Application</p><p>Categories=Application;Development;</p><p>StartupNotify=true</p>

软件在Linux下是无法显示中文的,可以通过如下操作解决:

打开Sublime的菜单栏 -> Preferences -> Settings – User,在配置文件中增加(前半部分原本就有,可看情况进行替换):



// Settings in here override those in “Default/Base File.sublime-settings”, and

// are overridden in turn by file type specific settings. Place your settings

// here, to ensure they’re preserved when upgrading.

{

“font_face”: “WenQuanYi Micro Hei Mono”

}



其中“文泉驿”是著名的开源字体 http://wenq.org/

设置fcitx输入法的切换键,将默认的Ctrl+Space方式设置Ctrl+Shift,但是这样效果不太好,经常中文会启动不了。

可以在其他地方输入后进行复制粘贴。

在以后的Sublime Text 2或许可以得到解决。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: