Home > Article > Development Tools > How to format 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 error-prone and time-consuming. In this case, you can use some professional editors to format the 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.
Download the automatic format plug-in: (recommended learning: notepad use)
NppAStyle.dll, you can select the plug-in in Notepad -->Pligin Manager-->show Plugin Manager-->Install the NppAStyle plug-in, or you can directly download the NppAStyle plug-in.
Then find 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.
Restart NotePad, the NppAStyle option will appear in the plug-in menu bar
Configure NppAStyle.
Click "Plug-ins"--->"NppAStyle"--->"options" in the menu bar, and select the appropriate style in the code style, such as java, or Stroustrup
The above is the detailed content of How to format code in notepad. For more information, please follow other related articles on the PHP Chinese website!