Reputation: 6136
Does IntelliJ IDEA support this feature?
Eclipse supports this with Ctrl + Shift + Del, vi with d$, so on...
Upvotes: 55
Views: 56103
Reputation: 21
Ctrl + Y. The first time you press it you will get the prompt to set to delete the whole line or to use it as Redo
Upvotes: 0
Reputation: 4211
double click to the line and keypress delete or backspace key
Upvotes: -2
Reputation: 2415
For me Delete Line was not predefined, I had to manually assign keyboard combo for it.
Go to File->Settings->Keymap->Editor Actions->Delete Line. Assign it as Alt+D.
I'm using Alt instead of Ctrl, because Ctrl is already assigned with all the alphabets for different operation. You can also use a (Ctrl + Shift + ? ) combos.
Upvotes: 3
Reputation: 46
Beside assigning the new shortcut keyboard for EditorDeleteToLineEnd
My combination is: Shift + End (To select from the caret to the end of line), then Ctrl + C/V or Delete
Upvotes: 0
Reputation: 148
For Windows or Linux User
Ctrl + y
For Mac User
Cmd + x or Cmd + del
You can also change this setting from Settings / Preferences >> Keymap >> Delete Line
Upvotes: 8
Reputation: 1040
For Windows Users,
Ctrl + x
it deletes the whole line, except when you highlighted parts of the line
Upvotes: 11
Reputation: 22392
Here for Mac users, to delete the current line in intellij :
source: https://www.jetbrains.com/idea/docs/IntelliJIDEA_ReferenceCard_Mac.pdf
Upvotes: 26
Reputation: 402423
In Settings
| Keymap
find the EditorDeleteToLineEnd action, right click, assign a shortcut that you want (make a copy of the keymap as you can't modify the default one):
Upvotes: 71
Reputation: 8846
According to the documentation, it does not support what you want. You can only delete the whole line (Ctrl+Y) or delete to word start/end (Ctrl+Backspace and Ctrl+Delete).
Upvotes: 15