[SublimeText] Settings - Users & Packages
{ "auto_complete": true, "color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night-Bright.tmTheme", // Require Tomorrow color scheme. "default_encoding": "UTF-8", "fold_buttons": true, "font_face": "微软雅黑", "font_size": 10, "highlight_line": true, "highlight_modified_tabs": true, "ignored_packages": [ "Vintage" ], "rulers": [ 80 ], "show_minimap": true, "tab_size": 4, "translate_tabs_to_spaces": true, "detect_indentation": true, "use_tab_stops": true, "trim_trailing_white_space_on_save": true, "wrap_width": 120 }
Package Control Installation
Sublime Text 2
import urllib2,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')
import urllib2,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read())
Sublime Text 3
import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
Packages:
1. Sublimerge Pro: 将两个文件进行版本对比。
2. SublimeCodeIntel: 自动语法提示。不通过Install Package安装,直接从GitHub下载,放到Packages目录即可。
3. Emmet: HTML编辑器,前身为Zen Coding。
4. Indent XML: 自动缩进XML和JSON,安装完毕后shift+ctrl+p调出控制面板,选择Indent XML。
5. JsFormat: 格式化JS文档,默认快捷键ctrl + shift + f
6. TidyHTML5: 格式化HTML文档,默认快捷键ctrl + alt + h
7. SublimeJEDI: Python 自动语法补全(VIM也有该插件),比 SublimeCodeIntel 好。可以使用GitHub 下载或者通过 Install Package 安装。