1. Package Control
Install
The Sublime Text package manager that makes it exceedingly simple to find, install and keep packages up-to-date.
Ref: https://packagecontrol.io/installation
1. Open console in Sublime Text by using "Ctrl + ` " or "View -> Show Console".
2. Input the appropriate code into the console for different version.
- Sublime Text 3
import urllib.request,os,hashlib; h = 'eb2297e1a458f27d836c04bb0cbaf282'+'d0e7a3098092775ccb37ca9d6b2e4b7d'; 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)) ifdh != h elseopen(os.path.join( ipp, pf), 'wb').write(by)
- Sublime Text 2
import urllib2,os,hashlib; h = 'eb2297e1a458f27d836c04bb0cbaf282'+'d0e7a3098092775ccb37ca9d6b2e4b7d'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) ifnotos.path.exists(ipp)elseNone; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen('http://packagecontrol.io/'+ pf.replace(' ','%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb').write(by)ifdh == h elseNone; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) ifdh != h else'Please restart Sublime Text to finish installation')
Use
Use "Command+Shift+P" to open the command panel of Package Control, and then use the following command to manage packages:
- Install Package
- Remove Package
- List Packages
- Enable Package
- Disable Package
- Upgrade Package
2. SublimeLinter
SublimeLinter is a linting framework, can help you find potential syntax errors and bugs in your code. Take linter for html, css, js as example.
Ref: http://www.sublimelinter.com/en/latest/about.html
Install
1. Use Package Control to install package "SublimeLinter".
2. Install node.js firstly, then install external linter binary for css, js, html.
brew install node
npm install -g csslint
npm install -g jslint
npm install -g htmlhint
3. Use Package Control to install linter package.
- css: Install package "SublimeLinter-cssint"
- js: Install package "SublimeLinter-jshint"
- html: Install package "SublimeLinter-contrib-htmlhint"
"lint_mode":"save only"
It means linting only occurs when a file is saved, not when it is loaded, so that we can type smoothly. Also, you can config other features in this file.
3. SublimeCodeIntel
SublimeCodelntel is a full-featured code intelligence and smart autocomplete engine for Sublime Text, supporting JavaScript, Python, HTML, Ruby, CSS, PHP, etc.
Ref: http://sublimecodeintel.github.io/SublimeCodeIntel/
Install
Use Package Control to install package "SublimeCodeIntel".
Use
- "Command + Shift + Space": pop up autocomplete whenever it's available
- "Ctrl + Click": jump to symbol declaration
- "Ctrl + Option + Command + Left": go back
Tips: The plugin doesn't support Rails.
4. Alignment
Dead-simple alignment of multi-line selections and multiple selections for Sublime Text.
Ref: http://wbond.net/sublime_packages/alignment
Install
Use Package Control to install package "Alignment".
Use
The default key to use alignment is "Ctrl + Command + A", which conflicts with the capture screen key of QQ. So we edit the key in "Preferences -> KeyBindings - User", here we use "Ctrl + Option + Command + ]" instead.
[
{ "keys": ["super+ctrl+alt+]"], "command": "alignment" }
]
5. BracketHighlighter
A bracket matcher and highlighter for Sublime.
Ref: http://facelessuser.github.io/BracketHighlighter/
Install
Use Package Control to install package "BracketHighlighter".
6. ColorPicker
A color picker plugin for Sublime Text.
Ref: http://weslly.github.io/ColorPicker/
Install
Use Package Control to install package "ColorPicker".
Use
Use "Command + Shift + C" to open the color pick panel.