yannisf
yannisf

Reputation: 6136

Delete to end of line in IntelliJ IDEA editor

Does IntelliJ IDEA support this feature?

Eclipse supports this with Ctrl + Shift + Del, vi with d$, so on...

Upvotes: 55

Views: 56103

Answers (10)

RAKHMATILLA TUGANOV
RAKHMATILLA TUGANOV

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

double click to the line and keypress delete or backspace key

Upvotes: -2

vijayraj34
vijayraj34

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

mnhvu84
mnhvu84

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

Sadikur Rahaman
Sadikur Rahaman

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

chakwok
chakwok

Reputation: 1040

For Windows Users,

Ctrl + x

it deletes the whole line, except when you highlighted parts of the line

Upvotes: 11

Santhosh
Santhosh

Reputation: 29174

To delete the whole line (for mac users):

⌘ + x

Upvotes: 7

grepit
grepit

Reputation: 22392

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

Upvotes: 26

CrazyCoder
CrazyCoder

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

delete to end of line

Upvotes: 71

Bastien Jansen
Bastien Jansen

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

Related Questions