When you work in a long file, a keyboard shortcut can take you straight to a line without going through a menu. On the Linux desktop, Eclipse lets you change keyboard shortcuts for editor commands in Keys preferences.

The When setting controls where the binding is active. Editing Text applies when a text editor has focus. The Conflicts list shows competing bindings in that context, and a shortcut can also overlap a command in a broader context.

The current shortcut appears beside Go to Line… in the Navigate menu. Pressing the shortcut in the editor shows whether Eclipse opens the line-number prompt for the active file.

Steps to change keyboard shortcuts in Eclipse:

Start with a text file open in the Eclipse editor.

  1. Open Window > Preferences… from the menu bar.

    If the Install Java 27 Support notice appears, choose whether to install support. Once the notice is out of the way, use Window > Preferences… to continue.

  2. Type Keys in the search box above the Preferences tree.
  3. Select Keys under General.
  4. Drag the top edge of Preferences down if Apply and Close is below the screen.
  5. Click the filter field above the command list.
  6. Type go to in the command filter.
  7. Select the Go to Line row with Editing Text in the When column.
  8. Scroll down in the Keys pane if When or the Conflicts list is cut off.
  9. Click the Binding field for Go to Line.
  10. Press Backspace in Binding until the current shortcut, Ctrl+L by default, is cleared.
  11. Press Shift+Ctrl+Alt+K in Binding.
  12. Confirm the Conflicts list is empty.

    If Conflicts lists another command, repeat steps 9–12 with a different key combination.

  13. Click Apply and Close.
  14. Click inside the open text file to focus the editor.
  15. Press your new shortcut in the editor.
  16. Confirm that Go to Line opens with the file's line range in the Enter line number prompt above the field and the current line in the field.
Share this guide