PHP, ASP. Java, and Java code formatting tools

Source: Internet
Author: User
Tags html indent tidy

PHPCodeFormatting tool http://www.waterproof.fr/products/phpCodeBeautifier/
I recently modified a code with no indentation in it. I can use this to format it.
It is equivalent to the indent of the previous C
By the way
C, C ++ C #=> indent astyle
Java ==> astyle jalopy jacbe importscrbber
PHP ==> phpcodebeautifier
Perl ==> perltidy
Python ==> pydent
ASP ==> vbsbeaut

& Lt; TD width = "9%" & gt; htmltidy & lt;/TD & gt;
Tool Name Applicable Language Introduction Installation/Use
Indent C Indent is synonymous with code beautification tools Indent is a standard tool attached to GCC,
Indent [Options] [input-files]
Indent [Options] [Single-Input-file] [-O output-file]
Perltidy Perl Perltidy is also written in Perl. Download: Perl makefile. pl; Make; make install
Perltidy [Options] file1 file2 file3...
(Output goes to file1.tdy, file2.tdy, file3.tdy ,...)
Perltidy [Options] file1-O OUTFILE
Perltidy [Options] file1-ST> OUTFILE
Perltidy [Options] <infile> OUTFILE
Astyle C ++ Java (PHP) A Fast C/C ++/JavaSource codeBeautification tools.
Astyle has many complete set of style definitions better than indent: ANSI Java Linux... you don't have to remember the complex indentation specific options.
Download the source code, decompress the package, make, and generate the astyle executable file.
Astyle [Options] <original> beautified
Astyle [Options] Foo. cpp bar. cpp [...]
Astyle -- style = ANSI *. cpp
I tried to format PHP with it.ProgramIt is also very effective (of course, it is not a pure PHP code mixed with HTML code ).
Jalopy Java Powerful Java code formatting tool. In addition to the standard interface, the command line tool can also be used as a plug-in for ant JBuilder eclipse jdeveloper and other tools, and provides APIs Download from http://prdownloads.sourceforge.net/jalopy/
See the relevant installation documents.
Pydent Python Pythius contains two tools:
Pydent: Code indent Tool
Pystat: Code statistics Tool
After the source code is downloaded and unwrapped:
Run "Python setup. py build"
Run "Python setup. py install"
html/XML the error correction tool for HTML code can help your HTML code better comply with W3C specifications. It is now called tidy because it is not only used in HTML, it also applies to the formatting of xhtml xml.

but JSP is not suitable for beautifying the code of embedded scripts such as asp php jsp

download the source code and make to generate the tidy Executable File:
tidy file1 file2...
Note: Use the-raw option

tidy.exe-raw-imuq-wrap 132-F % F. err % F option Description:
-raw: do not modify Chinese characters (output values above 127 without conversion to entities)
-I indend default HTML indent by two spaces
-M overwrites the original file
-u forces all HTML tags to be capitalized (this can be left empty)
-wrap Page code with a width greater than 132 lines force line feed
-F % F. err outputs the error to "corresponding file name.
htmltidy supports XML formatting in the Err "file:
tidy-XML-imq web. XML
tidy-XML-imq build. XML
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.