Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shortcut to select a line of code in Android Studio

Is there a short cut to select one line of code in android studio?

like image 821
suku Avatar asked Jan 09 '17 05:01

suku


People also ask

How do I copy a line down in android studio?

Copy line: To copy a whole line place your cursor anywhere on that line and press Ctrl+C. This will automatically select the whole line and copy it to the clipboard.

How to use shortcut keys in Android Studio?

Some of the most important Shortcut keys used in Android Studio are: CTRL + E -> Recently opened files pop-up: The Android Studio has an option where you can browse the most recently opened files on the go. It performed with the help of Ctrl + E. Syntax: Windows: CTRL + E Mac: Command + E Example: CTRL + D -> Duplicate current line or selection:

How do I edit multiple lines of code in Android Studio?

Using multicursor in Android Studio Dec 29, 2017 One of the most useful methods for editing multiple lines of code or XML in Android Studio (or IntelliJ) is multicursor. This is a feature that makes it possible to edit multiple lines at the same time.

How do I find a sample code in Android Studio?

The Code Sample Browser in Android Studio helps you find Android code samples based on the currently highlighted symbol in your project. In your code, highlight a variable, type, or method. Right-click to display the context menu. From the context menu, select Find Sample Code. The results of your search appear in a tool window as shown in ...

How to create custom HotKeys in Android Studio?

First step, find the IDE shortcuts : cmd + shift + A enter shortcuts Third step : Set your custom shortcut (I suggest cmd + shift + / or cmd + : ) Show activity on this post. At least in Android Studio 2.2.3 with default key mapping, to comment or uncomment a select text, same hotkeys are used as Toggle.


2 Answers

Shift+Home or Shift+End will select all the text from the current caret position to the beginning or end of the current line. (Cmd+Shift+Left or Cmd+Shift+Right on mac). You can also triple-click on the required line to select it wholly. This can also be achieved by clicking on the line number.

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

They have more useful shortcuts here.

like image 87
Divins Mathew Avatar answered Oct 06 '22 21:10

Divins Mathew


You might also use CTRL + W several times.

like image 45
Ali Nem Avatar answered Oct 06 '22 21:10

Ali Nem