如何在Eclipse IDE编辑器中设置一行代码的快捷方式 [英] How to set shortcut to a line of code in Eclipse IDE editor
问题描述
eclipse有这样的功能吗?有没有任何插件添加这个功能到eclipse?
问候,
阿里
默认情况下,没有为此任务定义快捷方式。
我用来在过滤器文本中的Windows / Preferences / General / Keys类型书签中在Eclipse中定义我的快捷方式,并选择要定义快捷方式的命令。
我目前的快捷方式是:
- Alt + Shift + B,Alt + Shift + A 添加书签;
- Alt + Shift + B,Alt + Shift + V :显示视图(BookMarks);
但是,我同意,仍然不如Delphi预定义的快捷方式。
更新1: strong>
此插件(或其附件)似乎提供了选项。从他们的网站:
在光标处添加一个编号的书签:Alt> + [digit] 。这将使用单按键创建一个
快速书签,并使用指定的数字。
工作空间中只能有一个给定号码的书签。
再次设置相同的数字书签将清除较早的
实例。
转到编号书签:Alt + Shift + [digit]。移动到书签
它使用Alt + [数字]设置。
更新2:
经过测试(Eclipse Indigo),它的工作就像一个魅力。
I'm after a feature in eclipse that allows me to allocate a shortcut to a line (say line number 55) then go somewhere else in the same file and hit the shortcut then IDE shows me the line 55. I have used this feature in Delphi IDE. Using CNTL + number keys[1,2,...,0] a shortcut to line where the curser is will be created. This shortcut only has effect within the editor and each opened file would have its own shortcuts. Is there such a feature in eclipse? Is there any plugins out there which adds this feature to eclipse?
Regards,
Ali
By default there is no shortcut defined for this task. I use to define my shortcuts in Eclipse in "Windows/Preferences/General/Keys" type bookmark in the filter text and select the commands you want to define the shortcuts.
My current shortcuts are:
- Alt+Shift+B, Alt+Shift+A: Add Bookmark;
- Alt+Shift+B, Alt+Shift+V: Show View (BookMarks);
But, I agree, still is not fast as the Delphi predefined shortcuts.
Update 1: This plugin (or its sucessor) seems to offer the option. From their site:
Add a numbered bookmark at the cursor: Alt>+[digit]. This creates a quick bookmark with the specified number using a "single" keypress. Only one bookmark of the given number can be present in the workspace. Setting the same number bookmark again will clear the earlier instance.
Goto a numbered bookmark: Alt+Shift+[digit]. Moves to the bookmark as it was set using Alt+[digit].
Update 2: Tested (Eclipse Indigo) and it worked like a charm.
这篇关于如何在Eclipse IDE编辑器中设置一行代码的快捷方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!