Well-known sublime is the front-end classmate most respected IDE, not one, but at the same time, there is a large number of students have been using webstorm, including me, the reason is very simple, sublime although easy to use, but need to configure their own desired features and plug-ins, but also to see the tutorial online, More frightening is the sublime configuration does not have the function of the cloud synchronization, that is, the configuration of the smallpox dragon and Phoenix, but back to the home of the computer has to be re-configured again, think is also drunk, so I am very hopeful that sublime official can be a cloud synchronization function (^_^).
Sublime is like this, very lightweight, what they usually need to configure their own, and not like webstorm such a large number of functions are assembled to the installation package, the use of a fool-type installation of small white, but indeed very convenient.
Pull a bit more, directly into the subject bar, the following record their own personalized configuration information, the need for students can also refer to the reference.
1. Download the installation package and install the "portal"
2, Package Control installation (after installation can be very convenient to install plug-in)
From the menu View-show console or CTRL + ~ shortcut keys, bring up the console. Paste the following Python code in and enter to perform the installation without exception.
The installation code for Sublime text 3 and Sublime text 2 is provided below:
# Sublime Text 3import Urllib.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 ())
# Sublime Text 2import Urllib2,os; 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 ())); Open (Os.path.join (IPP, PF), ' WB '). Write (Urllib2.urlopen (' http://sublime.wbond.net/' +pf.replace (', '%20 '). Read () ); Print (' Restart Sublime Text to finish installation ')
3, plug-in installation
A) "Preferences"--"package Control", or you can use the shortcut key ctrl+shift+p to open
b) Enter "Install", below will be prompted "package Control:install", with the mouse click
c) Wait a few seconds at this time, will pop up a terminal, in the terminal input you want to install the plug-in, such as "less", click the matching plug-in can be installed automatically
d) Installation information prompt in lower left corner (Preferences, package Settings to see installed plugins, some plugins need to restart Sublime Text)
Here is the plugin for my installation:
- Less plugins: Less
- Docblockr: Automatically generates PHPDOC-style annotations. It supports languages such as JavaScript, PHP, ActionScript, Coffeescript, Java, Objective C, C, C + +
4. Shortcut keys
Shortcut key is also a major feature of sublime, like Vim, but need to learn a set of shortcut keys is not easy, and I do not want to learn a new set of "Vim" for the IDE, so only a few of the common shortcut keys.
- Ctrl + D: Quick selection of multiple selected characters (strings), batch modification
- Ctrl + Shift +↑/↓: Move up and down while moving forward
5. Ignore Dependent directories
Sometimes we have to use sublime Text file retrieval function to find a specific file, if the project directory under the Node_modules, Bower_components and other folders will seriously affect the output, plus the files in these folders will not be changed, We can modify the configuration to ignore these directories, of course, it is necessary to open it again.
Menu-Preferences-setting-user Add the following configuration:
"Folder_exclude_patterns": [ ". SVN", ". Git", ". Hg", "CVS", "Node_modules", " bower_ Components "]
Sublime Text Usage Diary