How to format code in notepad++

Source: Internet
Author: User

In reading other people's code occasionally encounter format is very messy, read very laborious situation, if manual change, very error-prone and time-consuming, then can use some professional editor to format the code, notepad++ is a lightweight code editor, taking up less memory, running fast, but NotePad + + itself is not with this formatting feature, but he supports the Nppastyle plugin to complete the formatting.

    1. Install notepad++, install package download: Http://rj.baidu.com/soft/detail/13478.html?ald

    2. Download the auto-format plugin:NppAStyle.dll , you can select a plugin-->pligin manager-->show Plugin manager--> Install Nppastyle plug-in in Notepad. You can also download the Nppastyle plugin directly, Link: http://pan.baidu.com/s/1kTzcQV1

    3. Then find the installation directory of the notepad++ you installed (the simplest way is to click "Open File Location" in the properties of the notepad++ shortcut you are using). After entering, we open the Plugins folder and copy the NppAStyle.dll just extracted here.

    1. Restart notepad++, the Nppastyle option appears in the Plugin menu bar

2. Configure Nppastyle.

Click "Plugins" in the menu bar---> "nppastyle"---> "options" to choose the right style in your code style, such as Java, or Stroustrup

Open the messy code, use the alt+f key to format ,

Before format

After formatting:

Partly reproduced in Worldsing's blog, http://www.cnblogs.com/worldsing/p/4174191.html

How to format code in notepad++

Related Article

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.