Oracle SQL Developer 中大写选定文本的快捷方式

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

Shortcut to Uppercase Selected Text in Oracle SQL Developer

oracleoracle-sqldeveloper

提问by Andrew Mairose

I would like to highlight some text in a SQL Developer worksheet and convert it to uppercase with some keyboard shortcut.

我想突出显示 SQL Developer 工作表中的一些文本,并使用一些键盘快捷键将其转换为大写。

Is there any such shortcut in Oracle SQL Developer?

Oracle SQL Developer 中是否有这样的快捷方式?

I am using version 4.1.2.

我使用的是 4.1.2 版。

采纳答案by Andrew Mairose

Found it! You can select text in your worksheet, then use Ctrl+Shift+"to switch between cases (in version 4.1.2).

找到了!您可以在工作表中选择文本,然后使用Ctrl+ Shift+"到交换机之间的情况下(4.1.2版本)。

It will cycle between the following cases:

它将在以下情况之间循环:

Upper Case:

大写:

SELECT * FROM MYSCHEMA.EXAMPLE;

Lower Case:

小写:

select * from myschema.example;

Upper Keywords:

上关键词:

SELECT * FROM myschema.example;

Lower Keywords, Upper Identifiers:

较低的关键字,较高的标识符:

select * from MYSCHEMA.EXAMPLE;

Upper Keywords, Lower Identifiers:

上关键字,下标识符:

SELECT * FROM myschema.example;

Initial Cap:

初始上限:

Select * From Myschema.Example;


As mentioned by @PiotrSiekierski, you can change the keyboard shortcuts in Tools -> Preferences -> Shortcut Keys. In version 4.1.2, the Ctrl+'shortcut is mapped to 'Navigate Down' by default.

正如@PiotrSiekierski所提到的,您可以在Tools -> Preferences -> Shortcut Keys. 在 4.1.2 版本中,Ctrl+'快捷方式默认映射到“向下导航”。



As mentioned by @Sentinel, if you are not interested in cycling through the different case options, you can assign a shortcut to 'Convert Selection to Uppercase' or 'Convert Selection to Lowercase' by going to Tools -> Preferences -> Shorcut Keysand searching for the desired functionality. You can then assign a shortcut to those commands, such as Ctrl+Uor Ctrl+L. In version 4.1.2, the 'Convert Selection to Uppercase' and 'Convert Selection to Lowercase' commands have no shortcut mapping by default.

正如@Sentinel所提到的,如果您对循环使用不同的大小写选项不感兴趣,您可以通过转到Tools -> Preferences -> Shorcut Keys并搜索所需的功能来分配一个快捷方式来“将选择转换为大写”或“将选择转换为小写” 。然后,您可以为这些命令指定快捷方式,例如Ctrl+UCtrl+ L。在 4.1.2 版本中,“将选择转换为大写”和“将选择转换为小写”命令默认没有快捷方式映射。

回答by Sentinel

Under Tools->Preferences->Shortcut Keysyou can find and/or define the shortcut key combination for the Convert Selection to Uppercaseand Convert Selection to Lowercasecommands. I have mine mapped to CTRL+Uand CTRL+Lrespectively. There unfortunately does not appear to be a specific command for converting text to Initcap, so the To Upper/Lower/Initcapcommand is the way to go for that. However, be aware that the To Upper/Lower/Initcapcommand actually cycles between five format modes:

Tools->Preferences->Shortcut Keys您可以找到和/或定义Convert Selection to UppercaseConvert Selection to Lowercase命令的快捷键组合。我已经分别映射到CTRL+UCTRL+ L。不幸的是,似乎没有将文本转换为 Initcap 的特定命令,因此该To Upper/Lower/Initcap命令是实现该目标的方法。但是,请注意该To Upper/Lower/Initcap命令实际上在五种格式模式之间循环:

  • UPPERCASE
  • lowercase
  • Initcap
  • Lower Keywords, Upper Identifiers
  • Upper Keywords, Lower Identifiers
  • 大写
  • 小写
  • 初始帽
  • 较低的关键字,较高的标识符
  • 上关键字,下标识符

Some of these modes will change the behavior of the code formatter (default key sequence CTRL+F7), and the Tools->Preferences->Code Editor->Completion Insight->Change case as you typesetting if you have it enabled.

其中一些模式将更改代码格式化程序的行为(默认键序列CTRL+ F7),以及Tools->Preferences->Code Editor->Completion Insight->Change case as you type启用时的设置。

回答by Shanyangqu

in 4.2.0.17 highlight the word(s) then Alt + '

在 4.2.0.17 中突出显示单词然后 Alt + '

回答by Luke X

This is perhaps and old question, but I noticed that while on Mac, the keyboard shortcut for cycle is unbound.

这可能是个老问题,但我注意到在 Mac 上,循环的键盘快捷键未绑定。

I followed the above suggestions in

我遵循了上述建议

tools->preferences->shortcuts

and bound it myself to ctrl + ' but note that in 4.2 on Mac by default this is unbound.

并将其绑定到ctrl +' 但请注意,在 Mac 上的 4.2 中,默认情况下这是未绑定的。

回答by Matt

This cycles through Upper/Lower/Initcap.

这会在 Upper/Lower/Initcap 之间循环。

CTRL+ '

CTRL+ '

回答by Piotr Siekierski

Ctrl + ' changes case by default. You can find all shortcuts in:

Ctrl + ' 默认情况下更改大小写。您可以在以下位置找到所有快捷方式:

tools->preferences->shortcuts

回答by Wendel

This cycles through Upper/Lower/Initcap in my SQL Developer version 18.2.0.183 Build 183.1748.

这在我的 SQL Developer 版本 18.2.0.183 Build 183.1748 中循环通过 Upper/Lower/Initcap。

ALT+ '

ALT+ '

回答by ccarpan

In newest versions you can highlight the text and then go to: Tools >> PL/SQL Beautifier and this will format your query and uppercase the text!

在最新版本中,您可以突出显示文本,然后转到:工具 >> PL/SQL Beautifier,这将格式化您的查询并将文本大写!

Hope it helps.

希望能帮助到你。

回答by Maulzey

Use

Control + '

Everytime you press it, it toggles between camel case, lower case, and upper case. I hope this helped you.

每次按下它时,它都会在驼峰式大小写、小写和大写之间切换。我希望这对你有帮助。

My SQL dev is 18.4. It worked for me

我的 SQL 开发是 18.4。它对我有用