次の方法で共有


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

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!!

Technorati Tags: notepad++,textfx,html,tidy,editor,indent

Comments

  • Anonymous
    December 11, 2008
    Thank you! Huge help, although now it appears that you have to move that folder into the configuration directory I am using notepad++ 5.1 and the folder should be Notepad++pluginsConfigNPPTextFXA or Notepad++pluginsConfigNPPTextFX