Sublime Forum

Another brackets location

#1

Hi, sorry for my English :blush: .

I write the CSS code by this way with a tab space before a last bracket:

ul.custom-list { some:rules; } ul.custom-list li { some:rules; }

Sublime inserts brackets like this:

ul.custom-list { some:rules; }

without the tab space

I have wrote a snippet for my custom brackets position with the tab space before the last bracket:

<snippet> <content><![CDATA[ { ${1:} } ]]></content> <description>CSS brackets</description> <tabTrigger>br</tabTrigger> </snippet>

But Zen Coding abbreviation or another snippet, which I write immediately after the brackets expanding, will not be expanded because a first brackets snippet still have a focus. In this case if I will push a tab key to expand Zen Coding abbreviation or another snippet cursor will jump to the end of bracket snippet.
http://clip2net.com/clip/m0/1336218814-clip-12kb.png

If I will press Esc, before pressing the tab key for the second snippet expanding the first brackets snippet will lost the focus and only after this the second snippet may be expanded.

Is it possible somehow to cancel such behavior of the snippets, when the last tab key pressing sends the cursor to the end of expanded snippet?

0 Likes

#2

I have solved this problem :laughing:

I needed $0 statement:

<snippet> <content><![CDATA[ { $0 } ]]></content> <description>CSS brackets</description> <tabTrigger>br</tabTrigger> </snippet>
I will have more attention reading the docs next time.
http://sublimetext.info/docs/en/extensibility/snippets.html:

And if you want $0 with placeholder you may to write like this: ${0:Hellow!} It will work well.

0 Likes