如何在Android Studio中的多行上应用TAB

时间:2015-02-10 14:12:16

标签: android android-studio shortcode tabular

我想知道是否有一个短代码(MAC)来标记几行(见下面的例子)。

<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"/>

- &GT;

<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"/>

我浏览了command list,但找不到东西。也许还有另一种方法可以做到。

4 个答案:

答案 0 :(得分:3)

<强>不确定即可。按下(并按住)Mac上的alt-option命令,然后单击鼠标/触摸板并向上/向下移动。效果如下:

enter image description here

source

答案 1 :(得分:1)

选择多行,然后按Tab键缩进它们或按Shift + Tab键取消它们。这至少适用于使用Android Studio V2.1.2的OS X V10.11.6。希望这可以帮助您或阅读此问题的人。感谢。

答案 2 :(得分:0)

要在android studio编辑器中以Tab键移动多行:

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

Shift TAB向后执行相同的操作。

答案 3 :(得分:-1)

您可以尝试使用CMD + Shift + L(自动缩进)