Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio delete line and duplicate line shortcuts

What is the shortcut in Android Studio to delete a line? And what is the shortcut to duplicate a line?

I found the answer in the documentation and I am posting it below for quick reference.

like image 628
Suragch Avatar asked Nov 21 '16 10:11

Suragch


People also ask

What is the shortcut to delete a line?

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.


1 Answers

Linux/Windows

  • Control + D : Duplicate current line or selection
  • Control + Y : Delete current line

Note from comments: Shift + Delete cuts the current line.

Mac

  • Command + D : Duplicate current line or selection
  • Command + Delete : Delete current line

See also

  • Android Studio Keyboard Shortcuts documentation
  • Android Studio Shortcuts You Need the Most

If it's not working, check the Keymap settings:

enter image description here

like image 103
Suragch Avatar answered Oct 14 '22 12:10

Suragch