Cursor position when expanding snippet in Sublime text

Question:

I decided to get confused by creating snippets in sublime text for convenience, but I ran into trouble when deploying a snippet, the cursor flies to the end of the entire hierarchy, and I would like it to get up where I need it, read in the net that it has a similar setting, but according to my Google requests outputs nothing ((

Answer:

In the snippet body, specify ${1} – when inserting, the cursor will be at this place

<snippet>
  <content><![CDATA[
Rails.logger.info '#########################################'
Rails.logger.info ${1}
Rails.logger.info '#########################################'
]]></content>
  <tabTrigger>logger</tabTrigger>
  <scope>source.ruby</scope>
</snippet>

After entering the name of the snippet logger and <Tab> cursor will move to the next position

Rails.logger.info '#########################################'
Rails.logger.info |
Rails.logger.info '#########################################'
Scroll to Top