Delete a line in Eclipse

前端 未结 8 508
有刺的猬
有刺的猬 2021-01-30 00:37

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

相关标签:
8条回答
  • 2021-01-30 00:53

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

    0 讨论(0)
  • 2021-01-30 00:54

    To quickly find shortcuts, hit Ctrl + L, Ctrl + L (Ctrl+L twice), 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.

    0 讨论(0)
  • 2021-01-30 01:02

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

    Now type "Delete" and reassign the filtered commando.

    0 讨论(0)
  • 2021-01-30 01:04

    Ctrl + D should delete the line.

    0 讨论(0)
  • 2021-01-30 01:09

    if your are using MAC then it is

    command + D  => ⌘ + D
    
    0 讨论(0)
  • 2021-01-30 01:11

    Ctrl + D

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

    For Mac users: + D

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