It turned out a little more difficult than I anticipated.
I had Emmet package installed. Emmet has own autocompletion support, but I did not manage to make it spit out the
<![CDATA[...]]>
sequence that I needed.So I disabled Emmet's autocompletion for xml scope by inserting the following in
Emmet.sublime-settings
:{ "disable_tab_abbreviations_for_scopes": "text.xml" }
Sublime snippets are themselves using <![CDATA[...]]> syntax for the replacement strings. Doh. <![CDATA[...]] tags can't be nested. It does not allow multiple CDATA inside 'content' tags either.
Now the desired autocompletion works well in good old xml.sublime-completions:
{ "scope": "text.xml", "completions": [ { "trigger": "t", "contents": "<Text id="$1"><![CDATA[$0]]>/Text>" } ] }