Format code using the Html-css-js prettify plugin for sublime Text 3

Source: Internet
Author: User
Tags sublime text

Many times, we want to format the HTML-CSS-JS code, the site has a lot of tools to implement this feature, of course, my Site home page also has. But wouldn't it be quicker and easier if we had such a feature on the Code editor? So, let's take a look at how sublime Text 3 uses plug-ins to implement this feature!

first, the necessary conditions:

1, first, you have to have sublime Text 3 editor;
2, you local to configure the Nodejs environment (installation method can be consulted: node. JS Learning notes);
3, your sublime Text 3 editor to install HTML-CSS-JS prettify plug-in (installation method can refer to: Sublime Common plug-in summary).

second, the installation process:

1. We open the sublime Text 3 editor and install the Html-css-js prettify plugin.

A) in Sublime Text 3, press Ctrl+shift+p to bring up the command panel;
b) Enter install to bring up the Install Package option and enter;
c) Enter pretty and select Html-css-js prettify in the list and enter to install.

2. View the local installed Nodejs configuration environment path (under DOS command, enter where node and return).

3. In any of the html/js/css files in the editor, right-click, appear as shown, select Set Plugin options.

4. Save the Nodejs local path in step 2 above to the file opened in step 3 as shown in.

5, successfully installed HTML-CSS-JS prettify plug-in.


three, do a demo:

1, the original HTML template, the chaos is unbearable.

2, right click, select Prettify Code.

3. Format the result.


Format code using the Html-css-js prettify plugin for sublime Text 3

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.