8

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.

Den Jo
  • 112
  • 1
  • 12

4 Answers4

5

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)

Sebastiano
  • 12,289
  • 6
  • 47
  • 80
3

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.

Liu Tao
  • 2,063
  • 2
  • 10
  • 14
2

To tab shift multiple lines in android studio editor:

Select lines ( SHIFT-DOWN/UP ) and press TAB key 

Shift TAB does the same backwards.

Mike Zriel
  • 1,575
  • 1
  • 17
  • 28
-2

You can try with CMD+Shift+L (auto indent)

webo80
  • 3,365
  • 5
  • 35
  • 52