如何在Eclipse IDE编辑器中设置一行代码的快捷方式 [英] How to set shortcut to a line of code in Eclipse IDE editor

查看:274
本文介绍了如何在Eclipse IDE编辑器中设置一行代码的快捷方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在eclipse中的一个功能之后,允许我为一条线分配一条快捷方式(例如行号55),然后在同一个文件中的其他位置点击快捷方式,然后IDE显示我的行55.我已经使用这个功能在Delphi IDE中。使用CNTL +数字键[1,2,...,0]一个快捷方式来创建光标。此快捷方式只在编辑器中有效,每个打开的文件将具有自己的快捷方式。
eclipse有这样的功能吗?有没有任何插件添加这个功能到eclipse?



问候,



阿里

解决方案

默认情况下,没有为此任务定义快捷方式。
我用来在过滤器文本中的Windows / Preferences / General / Keys类型书签中在Eclipse中定义我的快捷方式,并选择要定义快捷方式的命令。



我目前的快捷方式是:


  1. Alt + Shift + B,Alt + Shift + A 添加书签;

  2. 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:

  1. Alt+Shift+B, Alt+Shift+A: Add Bookmark;
  2. 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屋!

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