Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 623
yannisf Avatar asked Apr 15 '13 07:04

yannisf


People also ask

How do I delete an entire line in Intellij?

One way to delete a line is to select the whole line and press N/A , but a more efficient way would be to press Ctrl+L when the cursor is anywhere in that line.

What is the shortcut to delete a line in Intellij?

Delete the current line Press Ctrl+Y .

How do you get to the End of a method in Intellij?

Ctrl + Shift + M will toggle you between the starting and closing parentheses.

How do you delete a whole line?

Place the text cursor at the beginning of the line of text. On your keyboard, press and hold the left or right Shift key and then press the End key to highlight the entire line. Press the Delete key to delete the line of text.


2 Answers

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

like image 185
CrazyCoder Avatar answered Oct 14 '22 07:10

CrazyCoder


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

like image 24
grepit Avatar answered Oct 14 '22 06:10

grepit