I decided to get bogged down by creating snippets in sublime text for ease of work, but I stumbled upon a nuisance when deploying a snippet and the cursor flies to the end of the entire hierarchy, and I would like it to get up where I need, read it in nete that it has a similar setting, but by my Google requests displays nothing ((
1 answer
In the body of the snippet, specify ${1} - when inserting, the cursor will be in 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 '#########################################' - Yes, I see you can do with the same construction $ {1} Thank you - Constantine Shibaev
- You can simply
${1}before the place where the cursor should be. - Sasha Chernykh - oneThanks for the comments, corrected the answer. - cheops
|