Shortcut for selecting a line of code in Android Studio

Is there a short cut for selecting a single line of code in android studio?

+5
source share
4 answers

Shift + Home / End selects all the text from the current caret position to the beginning or end of the current line. (Cmd + Shift + Left / Right Arrow on Mac). You can also triple click on the desired line to fully select it.

If you want to copy / cut an entire line, then Ctrl + C / Ctrl + X after placing the caret on the desired line will do.

They have more useful shortcuts here .

+9
source

Try using CTRL + C

This should select and copy the entire current line. Please note that this will not work if you already have the selected text. In this case, CTRL + C will behave as usual, copying only the selected text.

I should note that I based my answer on the fact that Android Studio is built on the IntelliJ platform, so most shortcut keys are probably the same between them.

Link: Select the current line in intellij

+3
source

For Windows:

  • Shift + End (from cursor to end of line)
  • Shift + Home (from the beginning of the cursor to the beginning of the line)
  • Triple click on a line
+2
source

You can also use CTRL + W several times.

+1
source

Source: https://habr.com/ru/post/1262508/


All Articles