Ubuntu下安装Sublime Text 2,添加右键菜单

Sublime Text 2是免安装的,下载完解压就可以了。我这边解压路径是/home/fhp/App/SublimeText2 为了能在终端直接使用sublime打开文件,添加软链接: sudo ln -s /home/fhp/App/SublimeText2/sublime_text /usr/bin/sublime 添加desktop: sudo sublime /usr/share/applications/sublime.desktop [Desktop Entry] Version=1.0 Name=Sublime Text 2 GenericName=Text Editor Exec=sublime Terminal=false Icon=/home/fhp/App/SublimeText2/Icon/48×48/sublime_text.png Type=Application Categories=TextEditor;IDE;Development X-Ayatana-Desktop-Shortcuts=NewWindow [NewWindow Shortcut Group] Name=New Window Exec=sublime -n TargetEnvironment=Unity 修改文件关联: 编辑sudo sublime /usr/share/applications/defaults.list: 替换文件中所有gedit.desktop为sublime.desktop。