Java 在 Eclipse 中删除一行

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

Delete a line in Eclipse

javaeclipse

提问by

In a Visual Studio, you would use Ctrl+L, whereas in Eclipse I am forced to select a line or, if it is empty, go the beginning of the line before clicking delete/backspace.

在 Visual Studio 中,您将使用Ctrl+ L,而在 Eclipse 中,我被迫选择一行,或者,如果它为空,则在单击删除/退格键之前转到该行的开头。

Is there a quick shortcut? Thanks!

有快捷方式吗?谢谢!

采纳答案by Joshua McKinnon

Ctrl+ D

Ctrl+ D

From Help->Key Assist... there are all kinds of useful keyboard shortcuts for Eclipse.

Help-> Key Assist...有各种有用的 Eclipse 键盘快捷键。

For Mac users: ?+ D

Mac 用户:?+D

回答by Dan Lew

Ctrl+ Dshould delete the line.

Ctrl+D应该删除该行。

回答by mandaleeka

In the future, if you need to quickly find a keyboard shortcut for something simple, just hit Ctrl+Shift+L.

以后,如果您需要快速找到简单的键盘快捷键,只需点击Ctrl+ Shift+ L

回答by Real Red.

And if you want it as a list to take a print or something, here is a link to the eclipse shortcut pdf.

如果您希望将其作为打印或其他内容的列表,这里是 eclipse 快捷方式 pdf 的链接。

shortcut to pdf page

pdf页面的快捷方式

回答by Ewen Cartwright

To quickly find shortcuts, hit Ctrl+ L, Ctrl+ L(Ctrl+Ltwice), then type something approximating what your command does in the filter text for the key assignments. This works pretty well for most shortcuts, although it can be a bit tricky for some where the name of their menu assignment bears no relation to that of their command in this list (for instance, Team->Revert to base appears in the keys list as 'Replace with latest from repository'), so sometimes a little lateral thought is required :-) If no shortcut exists, it's easy to add one in the keys dialog.

要快速找到快捷方式,请按Ctrl+ LCtrl+ L( Ctrl+L两次),然后在键分配的过滤器文本中键入一些近似于您的命令的作用的内容。这对于大多数快捷方式都非常有效,尽管对于某些菜单分配的名称与此列表中的命令名称无关的某些人来说可能有点棘手(例如,Team->Revert to base 出现在键列表中如“用存储库中的最新版本替换”),因此有时需要进行一些横向思考:-) 如果不存在快捷方式,则很容易在键对话框中添加一个。

回答by guerda

You can reassign the Delete Linecommand to your favourite hotkey.
Window->Preferences
General->Editors->Keys.

您可以将Delete Line命令重新分配给您喜欢的热键。
窗口-> 首选项
常规-> 编辑器-> 键。

Now type "Delete" and reassign the filtered commando.

现在输入“删除”并重新分配过滤后的突击队。

回答by Md Ayub Ali Sarker

if your are using MAC then it is

如果您使用的是 MAC 那么它是

command + D  => ? + D

回答by Md Ayub Ali Sarker

press Ctrl+Shift+L TWICE and press TAB then you can type to find your shortkeys

按 Ctrl+Shift+L 两次并按 TAB 然后您可以键入以找到您的快捷键