Search code examples
androidandroid-studioshortcodetabular

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.


Solution

  • 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)