Rexiology::Work

Microsoft, Information Technologies...

Community

News

  • From Taiwan, living and working at Tokyo, Japan.




Recent Posts

Tags

Microsoft Sites

Other Sites

Blog pools

Bloggers

Archives

Site Info



Locations of visitors to this page




Logos & Chicklets


GeoURL


Rex's Certifications
Rex's Certifications


Creative Commons授權條款
本 著作 係採用
Creative Commons 授權條款



Auto-Indent HTML source in Notepad++ using TextFX Html Tidy

crosspost from http://blogs.msdn.com/rextang

Am started investigating CRM 4.0’s aspx source for custimization. had the requirements of re-indenting aspx/html code so that I can see the table layout structure and others. here is the quick note about using TextFX Html Tidy in Notepad++ to do the html auto-indention.

First of all , HTML Tidy is a project of reformatting/transforming HTML source. and Notepad++ got TextFX plug-in and can work with HTML Tidy.

by referring to the Notepad++ Tidy page, it stated:

As installed, HTML Tidy will not do much - it requires a configuration file to activate it. For Notepad++, create a text file in the folder plugins\NPPTextFX under your Notepad++ installation folder, and name it tidycfg.ini. After creating the file, select TextFX -> TextFX HTML Tidy -> Refresh Menu from TidyCFG.INI from the menu to load the file in Notepad++. Notepad++ will then show a list of possible actions in the TextFX -> TextFX HTML Tidy menu.

so I just followed the instructions above to make the tidycfg.ini file and put those basic formatting rules on that page for testing. after that, just create a simple reformatting rule like this one:

[Re-Indent HTML Source]
indent: yes
indent-spaces: 2

and it’s done. by running this rule under Notepad++, the html source will be re-indented to tag-view-friendly indention for me to check the layout and debug.

pretty nice editor, Notepadd++, and pretty nice plug-in, the TextFX HTML Tidy!!