How to set shortcut to a line of code in Eclipse IDE editor

前端 未结 2 1771
遇见更好的自我
遇见更好的自我 2020-12-21 17:22

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 sh

相关标签:
2条回答
  • 2020-12-21 17:37

    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.

    0 讨论(0)
  • 2020-12-21 17:45

    You can add Bookmarks to the code fragments you think are important to you in eclipse.

    I referred this link for the same purpose.

    0 讨论(0)
提交回复
热议问题