简体   繁体   中英

Disabling the last tab cursor movement in a Sublime Text snippet

I'm looking for a way to disable the last tab cursor movement in a Sublime Text snippet.

For clarity I'm referring to the last press of the tab key that brings you to the end of the snippet. In the below example, with '|n' representing each cursor position, I do not want to be moved to cursor position 2.

{% block |0 %}
    |1
{% endblock |0 %}|2

The slight inconvenience this causes is having to exit/cancel the snippet auto completion before I can use Emmet completions at cursor position 1.

Any feedback is appreciated. Thank you.

Just found this answer on the sublime forums . If no $0 or ${0} is specified, it seems to default to the end of the snippet. If you change your snippet to:

{% block $1 %}
$0
{% endblock $1 %}

Then you will not get the last tab in the above |2 position. Oddly enough, the $1 will still come first.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM