Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to apply TAB on several lines in Android Studio

I am wondering if there is a shortcode (MAC) to tab several lines (see example below).

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Last Name"
android:id="@+id/textView"
android:layout_column="0"
android:layout_weight="1"/>

->

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Last Name"
    android:id="@+id/textView"
    android:layout_column="0"
    android:layout_weight="1"/>

I looked through the command list, but couldn`t find something. Maybe there is another way to do so.

like image 410
Den Jo Avatar asked Feb 10 '15 14:02

Den Jo


2 Answers

Sure. Press (and keep pressed) the alt-option command on your Mac, then click with the mouse/touchpad and move upwards/downwards. The effect is the following:

enter image description here

(source)

like image 61
Sebastiano Avatar answered Oct 12 '22 23:10

Sebastiano


Select several lines, then press tab to indent them or press Shift + tab to unindent them. This works at least on OS X V10.11.6 with Android Studio V2.1.2. Hope this helps you or people who read this question. Thanks.

like image 41
Liu Tao Avatar answered Oct 13 '22 00:10

Liu Tao