installing using the Package control component
You can also install the package control component and install it directly online:
- Press CTRL + ' bring up the console (note: There is a conflict between the keyboard shortcuts installed QQ Input method, Input Method property settings-Input Method management-Cancel Hotkey switch to QQ pinyin)
- Paste the following code into the bottom command line and enter:
|
importurllib.request,os; pf =‘Package Control.sublime-package‘; ipp =sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), ‘wb‘).write(urllib.request.urlopen( ‘http://sublime.wbond.net/‘+pf.replace(‘ ‘,‘%20‘)).read()) |
- Restart Sublime Text 3.
- If you see the package control item in Perferences->package settings, the installation succeeds.
By the way, put sublime Text2 code.
|
importurllib2,os; 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( ))); open( os.path.join( ipp, pf), ‘wb‘).write( urllib2.urlopen( ‘http://sublime.wbond.net/‘+pf.replace( ‘ ‘,‘%20‘)).read()); print( ‘Please restart Sublime Text to finish installation‘) |
If this method cannot be successfully installed, you can download the file here manually.
To install a plugin using the package control method:
- Press Ctrl+shift+p to bring up the command panel
- Enter install to bring up the Install Package option and enter, then select the plug-in you want to install in the list.
The uncomfortable is that some network environment may not allow access to unfamiliar network environment to set up a firewall, and sublime Text 2 seemingly unable to set up the proxy, may not get the list of installation packages.
Ok, the method is finished, here is the topic, some useful sublime Text 2 plugin:
Zen Coding
This, do not explain, still do not know Zencoding's classmates strongly recommend to look at: "Zen Coding: A quick way to write html/css code."
Sublimelinter
A plugin that supports lint syntax can highlight lines of code that Linter think is wrong, and also support highlighting special notes such as "TODO," which can be quickly positioned. (IntelliJ idea's Todo function is very good, this plug-in, although not comparable, but also enough for it)
Bracket highlighter
Similar to code matching, you can match the range within parentheses, quotation marks, and so on.
Gitgutter
This is a small and useful plugin that will tell you which rows have changed since the last git commit. An indicator appears next to the line number.
EMMET
Themes (Theme)
Sublime text can install themes, some themes are really cool. You can use package control to find these. Use package control to install a theme, and then update your user settings to use it.
user/preferences.sublime-settings{ "Soda light.sublime-theme"}
Note: You may have to restart sublime Text for these changes to take effect.
Theme–flatland
predawn
Theme-afterglow
This very nice configuration
"Theme": "Afterglow.sublime-theme",
"Color_scheme": "Packages/theme-afterglow/afterglow.tmtheme",
"Tabs_small": true,
Sublime Text Plugin