在 Eclipse 中选择单词的快捷键

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

Shortcut key to select word in Eclipse

eclipseeditorkeyboard-shortcuts

提问by alex2k8

Is there any keyboard shortcut to select a word? Or may be it can be assigned some how?

有没有选择单词的键盘快捷键?或者它可以分配一些如何?

回答by Instantsoup

Shift+ Alt+ selects enclosing elements.

Shift+ Alt+选择封闭元素。

Shift+ Alt+ reverses Shift+ Alt+ .

Shift+ Alt+反转Shift+ Alt+

Shift+ Alt+ selects enclosing elements moving upthe file.

Shift+ Alt+选择在文件中向上移动的封闭元素。

Shift+ Alt+ selects enclosing elements moving downthe file.

Shift+ Alt+选择在文件中向下移动的封闭元素。

回答by Joshua McKinnon

The quickest way to find any keyboard shortcut in Eclipse is to use Help->Key Assist (or Ctrl+ Shift+ L), which will pop up a nice tooltip with keyboard shortcuts and what they do. (If you press he Key Assist shortcut twice, you'll get the Keys Preferences page, which allows you to reassign shortcuts.)

在 Eclipse 中找到任何键盘快捷键的最快方法是使用 Help->Key Assist(或Ctrl+ Shift+ L),它会弹出一个带有键盘快捷键及其功能的不错的工具提示。(如果您按两次 Key Assist 快捷键,您将进入 Keys Preferences 页面,该页面允许您重新分配快捷键。)

String |myFancyString = "FooBar";

If your cursor is immediately to the left of 'm' (I am indicating this with a pipe (|)) :

如果您的光标立即位于 'm' 的左侧(我用竖线 (|) 表示这一点):

  • Shift+ Alt+ (Select Next Element) would select 'myFancyString'

  • Shift+ Alt+ (Select Previous Element) would also select 'myFancyString'

  • Ctrl+ Shift+ (Select Next Word) would select 'my', repeating it would select 'myFancy', followed by 'myFancyString '

  • Shift+ Alt+ (选择下一个元素)会选择“myFancyString”

  • Shift+ Alt+ (选择上一个元素)也会选择“myFancyString”

  • Ctrl+ Shift+ (选择下一个单词)会选择“我的”,重复它会选择“myFancy”,然后是“myFancyString”

回答by Steve De Caux

Shift+ Alt+ selects the word surrounding the cursor

Shift+ Alt+选择光标周围的单词

回答by GuruKulki

To select, you can use Shift+ Alt+ any arrow key.

要选择,您可以使用Shift+ Alt+ 任何箭头键。