SQL Developer-自动格式化选项 [英] SQL Developer - Auto Formatting option

查看:90
本文介绍了SQL Developer-自动格式化选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您知道,默认情况下,用于自动格式化用Oracle SQL Developer编写的代码的快捷方式是[Ctrl] + [F7].我的问题是如何编辑代码格式的样式,尤其是如果我可以导出此格式,以便可以将其应用于另一台计算机?谢谢!

As you know, the shortcut for auto formatting the code written in Oracle SQL Developer is [Ctrl] + [F7], by default. My question is how I can edit the style of formatting of the code and especially if I can export this formatting, so that it can be applied to another computer? Thank you!

推荐答案

从工具"菜单(或在OS X上,为SQL Developer菜单)转到首选项".在版本4.1.5或更高版本中,在首选项窗格中,依次展开数据库"部分和"SQL格式化程序"部分.

From the Tools menu (or on OS X, the SQL Developer menu) go to Preferences. In versions up to 4.1.5, in the preference pane expand the Database section, and then the SQL Formatter section.

顶层允许您导入和导出设置,而Oracle Formatting部分使您可以选择代码的格式化方式.

The top level lets you import and export settings, and the Oracle Formatting section lets you choose how you want your code to be formatted.

如果对您有用,那么您可以拥有多个具有各自特定格式的配置文件-也许您正在使用具有不同编码/样式标准的项目.

You can have multiple profiles with their own specific formatting if that's useful to you - maybe if you work on projects with different coding/style standards.

正如@thatjeffsmith在评论中提到的那样,自4.2.0起,它已移至首选项"->代码编辑器"->格式"->高级格式":

As @thatjeffsmith mentioned in a comment, since 4.2.0 this has moved to Preferences->Code Editor->Format->Advanced Format:

There is a section on this in the documentation.

这篇关于SQL Developer-自动格式化选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆