Home > Development Tools > notepad > body text

Implement automatic code typesetting in notepad++ (calling Astyle)

藏色散人
Release: 2021-02-24 16:40:04
forward
5954 people have browsed it

The following tutorial column of notepad will introduce to you how to realize automatic code typesetting (calling Astyle) in notepad. I hope it will be helpful to friends who need it!

I will first introduce how to call the original astyle in notepad.

In notepad: Run or F5,

##Select the directory where astyle.exe is located in the input box, Why don’t you have astyle? The download address is https://files.cnblogs.com/files/libra13179/AStyle_2.06_windows.zip. For introduction, help and download of Astyle, please refer to its official website: http://astyle.sourceforge.net /. It is recommended that the decompression path should not be in Chinese.

After selecting the path,

My installation path

E:\AStyle_2.06_windows\AStyle\bin\AStyle.exe

Add some parameters to the path of the input box command you just ran:

E:\AStyle_2.06_windows\AStyle\bin\AStyle.exe --style= ansi -S -N -n "$(FULL_CURRENT_PATH)" "$(FULL_CURRENT_PATH)"

[Remarks]

--style=ansi -S -N -nSet the layout format parameters for astyle. You can modify them according to your own situationClick save,

Just give it a name, for example, astyle, and you can also customize the shortcut keys according to your own needs!

If you want to modify it later, you can modify it yourself in the shortcut key management

Finally, "Settings"-> "Preferences"->"Others", check automatic updates, and that's it. You're done.

Okay, let's test it Deliberately messing up the code layout

Run the shortcut you just set

After automatic sorting

The above is the detailed content of Implement automatic code typesetting in notepad++ (calling Astyle). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template