wget -c http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3083_x64.tar.bz2 # sublime3的下载地址是这里 http://www.sublimetext.com/3 tar jxvf sublime_text_3_build_3083_x64.tar.bz2 -C /opt cd /opt/sublime_text_3/ ./sublime_text # 启动程序查看效果 ln -s /opt/sublime_text_3/sublime_text /usr/local/bin/sublime # 软链接到系统path中 cp /opt/sublime_text_3/sublime_text.desktop /usr/share/applications # 复制桌面支持到系统应用目录下 cd /usr/share/applications/ vim sublime_text.desktop # change Icon=/opt/sublime_text_3/Icon/48x48/sublime-text.png and Exec=/opt/sublime_text_3/sublime_text %F # 使得sublime的图标可显示
安装Package Control,按官方提供方法安装:https://packagecontrol.io/installation
安装了以下插件:
1.主题插件:http://jamiewilson.io/predawn/ 安装Predawn主题,完成后会打开他的messages文档信息,把里面的配置放入preferences->Settings-User配置中边栏变成黑色的
2.侧边栏插件:SideBarEnhancements 是一款很实用的右键菜单增强插件
3.python的插件:anaconda,不知道好不好用
点击 Tools > Build System > New Build System...
将打开的文件名命名为Python3.sublime-build
编辑文件内容为(让sublime text自动选择python语法):
{
"cmd": ["/path/to/python3", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
Pylinter.sublime-settings 配置了pylinter 插件。我使用下面的配置让 Pyhton 在保存时自动规范,并对违反规范显示图标。 { // Configure pylint's behavior "pylint_rc": "/Users/daniel/dev/pylintrc", // Show different icons for errors, warnings, etc. "use_icons": true, // Automatically run Pylinter when saving a Python document "run_on_save": true, // Don't hide pylint messages when moving the cursor "message_stay": true } SublimeCodeIntel 插件,智能提示插件,这个插件的智能提示功能非常强大,可以自定义提示的内容库,我的Python智能提示设置 "Python": { "python":"D:/Python27/python.exe", "pythonExtraPaths": [ "D:/Python27", "D:/Python27/DLLs", "D:/Python27/Lib", "D:/Python27/Lib/lib-tk", "D:/Python27/Lib/site-packages" ] } Python PEP8 Autoformat 插件 这是用来按PEP8自动格式化代码的。可以在包管理器中安装。快捷键 CTRL+SHIFT+R 自动格式化python代码
4.golang的插件:GoSublime(好像也不想要下面的配置)
{ "env": { "GOBIN":"/opt/golang/go/bin", "GOROOT":"/opt/golang/go", "GOPATH": "/opt/golang/gopath" } }
5.css3的插件:CSS3
ColorPicker 调色盘,Alignment 等号对齐按Ctrl+Alt+A,BracketHighlighter 高亮显示匹配的括号、引号和标签(需要时可以使用)
下面是我的一个配置preferences->Settings-User内容
{ "caret_extra_width": 1, "caret_style": "phase", "close_windows_when_empty": false, "color_scheme": "Packages/Predawn/predawn.tmTheme", "copy_with_empty_selection": false, "drag_text": false, "draw_minimap_border": true, "enable_tab_scrolling": false, "font_face": "Source Code Pro", "font_options": [ "no_round" ], "font_size": 14, "highlight_line": true, "highlight_modified_tabs": true, "match_brackets_content": false, "match_selection": false, "match_tags": false, "open_files_in_new_window": false, "overlay_scroll_bars": "enabled", "preview_on_click": false, "scroll_past_end": true, "scroll_speed": 5.0, "show_full_path": false, "sidebar_default": true, "tab_size": 4, "theme": "predawn.sublime-theme", "translate_tabs_to_spaces": true, "trim_trailing_white_space_on_save": true, "update_check": false, "word_wrap": true }