Home > Article > Development Tools > How to beautify code in notepad
When reading other people’s code, you may occasionally encounter situations where the format is messy and difficult to read. If you change it manually, it is easy to make mistakes and is time-consuming. In this case, you can use some Use a professional editor to format code. NotePad is a lightweight code editor that takes up less memory and runs quickly. However, Notepad itself does not have this formatting function, but it supports the NppAStyle plug-in to complete formatting.
Recommended tutorial: notepad usage tutorial
##1. Install Notepad and download the installation package:https: //www.php.cn/xiazai/gongju/92
2. Download the automatic format plug-in: NppAStyle.dll. You can also select Plug-in-->Pligin Manager--> in Notepad. show Plugin Manager-->Install the NppAStyle plug-in, or you can directly download the NppAStyle plug-in, link:http://pan.baidu.com/s/1kTzcQV1
3, and then find you The installation directory of the Notepad you installed (the easiest 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 we just decompressed here. 4. Restart NotePad, and the NppAStyle option will appear in the plug-in menu bar ## Configure NppAStyle.1. Click "Plug-ins"--->"NppAStyle"--->"options" in the menu bar and select the appropriate style in the code style, such as java, or Stroustrup
Open the code with a messy format and use the Alt F key to format it,
before format
After formatting:
The above is the detailed content of How to beautify code in notepad. For more information, please follow other related articles on the PHP Chinese website!