Delete to end of line in IntelliJ IDEA editor

Solution 1:

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):

delete to end of line

Solution 2:

Here for Mac users, to delete the current line in intellij : enter image description here

source: https://www.jetbrains.com/idea/docs/IntelliJIDEA_ReferenceCard_Mac.pdf

Solution 3:

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).

Solution 4:

To delete the whole line (for mac users):

⌘ + x