格式化 HTML 文档

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1820811/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 01:25:37  来源:igfitidea点击:

Format HTML document

htmleditornotepad++code-formatting

提问by AlexC

I like the feature in Visual Studio for formatting an HTML document (CTRL+K, CTRL+D).

我喜欢 Visual Studio 中用于格式化 HTML 文档(CTRL+ KCTRL+ D)的功能。

Is there a plugin with the same functionality in any other (free) editors, e.g. Notepad++?

在任何其他(免费)编辑器(例如 Notepad++)中是否有具有相同功能的插件?

回答by Emre Yazici

If you mean colorizing and formatting from "Format", Notpad++ has HTML tidying feature via Tidy2 plugin. Install the plugin with the Plugin Manager, and a new menu Tidy2 item will appears under the Plugins, and from there you can formatting HTML.

如果您的意思是从“格式”进行着色和格式化,Notpad++ 具有通过 Tidy2 插件的 HTML 整理功能。使用插件管理器安装插件,插件下会出现一个新的 Tidy2 菜单项,从那里你可以格式化 HTML。

Also Netbeans IDE has formatting(ALT+F) feature for many languages (including PHP, HTML, CSS and JS).

Netbeans IDE 还具有多种语言(包括 PHP、HTML、CSS 和 JS)的格式化(ALT+F)功能。