【发布时间】:2016-12-12 17:19:28
【问题描述】:
当模板插入时没有包围时,我无法将光标置于 $END$ 位置(使用选定的文本可以正常工作)。
//region MyRegion
$SELECTION$$END$
//endregion
有办法解决吗?
Android Studio 版本为 2.2.3。
更新
为了让问题更清楚,我添加了重现的步骤:
1) 按照上面的说明创建实时模板(环绕)。
2) 给它起个名字,例如#mrgn。
3)在某些类中尝试使用它。所以输入#mrgn 并按TAB。
它应该插入以下文本:
public class SomeClass {
//region MyRegion
< cursor should be here
//endregion
}
但它会插入文本并将光标放在错误的位置:
public class SomeClass {
//region MyRegion
< cursor is here.. but spaces are inserted, so only cursor does not work.
//endregion
}
【问题讨论】:
-
你的问题不清楚。尝试添加步骤来重现、实际行为和预期行为;)
标签: android-studio live-templates