Notepad++/Eclipse sql 代码自动缩进选项?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7871054/
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-09-01 12:35:27  来源:igfitidea点击:

Notepad++/Eclipse sql code auto-indent option?

sqleclipsenotepad++code-formatting

提问by Aubergine

DDL gets especially ugly. Is there any option of SQL auto-indenting for Notepad++? I've tried to do it in Eclipse, but the code doesn't react to auto-indent.

DDL 变得特别难看。Notepad ++是否有SQL自动缩进的选项?我尝试在 Eclipse 中执行此操作,但代码对自动缩进没有反应。

回答by Tao

Yes, there is a free/open-source T-SQL formatting plugin for Notepad++, called "Poor Man's T-SQL Formatter". It is available in the NPP "Plugin Manager" plugin list (gets updated every once in a while automatically), and is also available for manually downloading/installing from here: http://www.architectshack.com/PoorMansTSqlFormatter.ashx

是的,有一个用于 Notepad++ 的免费/开源 T-SQL 格式化插件,称为“Poor Man's T-SQL Formatter”。它在 NPP“插件管理器”插件列表中可用(每隔一段时间自动更新一次),也可以从这里手动下载/安装:http: //www.architectshack.com/PoorMansTSqlFormatter.ashx

If you just want to check it out without adding to notepad++, you can check the online formatting site:

如果你只是想查看而不添加到notepad++,你可以查看在线格式化站点:

http://poorsql.com

http://poorsql.com

(disclaimer: I wrote these tools :))

(免责声明:我写了这些工具:))

回答by Guido

There is also another free SQL Formatter plugin for Notepad++ with code folding and coloring and 100+ formatting option here: SQLinForm Free Notepad++ Plug-n. A free version is also available.

这里还有另一个用于 Notepad++ 的免费 SQL Formatter 插件,带有代码折叠和着色以及 100 多种格式选项:SQLinForm Free Notepad++ Plug-n。还提供免费版本。

enter image description here

在此处输入图片说明