Sublime not introduced, LESS2CSS is a plug-in installed on the sublime, you can write less after the automatic generation of CSS files, but also can be prompted less syntax error.
Search the relevant tutorials, many of them are not all written, follow their steps down after the discovery of errors, and even do not run correctly.
Straight into the topic, step (here only to write the installation steps under Windows, the use of brew under the Mac to install is very simple, and generally will not be wrong, skip directly)
1. Automatic compilation is dependent on node, so first install node, go to node website to download the version you need and then install it, usually the installer will automatically help you configure the environment variables, add the node installation directory to the system variables, if not check and manually add the environment variable (do not know how to set? Do it yourself);
2. After the installation of node also need to install node under less, need to install the global (after the installation of node, automatically with NPM, so the DOS command line directly run the following command, the-G parameter for the global installation, will help you install to the%appdata% directory).
NPM Install-g Less
Will not be automatically compiled if not installed
3. The LESS2CSS runtime also performs a clean-css function, so you also need to install LESS-PLUGIN-CLEAN-CSS under node, which also requires a global installation
NPM install-g Less-plugin-clean-css
If you do not install it, the error will pop up each time you save, and of course you can also screen the error by modifying the LESS2CSS configuration file.
4. Finally, we open the sublime, install the LESS2CSS plug-in (ctrl+shift+p)-----LESS2CSS Enter with the installation package command, Wait for the installation to complete reboot sublime.
5. In order to support less syntax highlighting, you also need to install a sublime plugin less so that you can write less smoothly.
Windows under Sbulime text installation less2css tread on several pits