File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 2121 % PLUGIN_NAME )
2222
2323
24- TPL = """<snippet>
24+ SNIPPET_TEMPLATE = """<snippet>
2525 <content><![CDATA[$1]]></content>
2626 <tabTrigger>${2:tab_trigger}</tabTrigger>
2727 <scope>${3:source.name}</scope>
28- </snippet>"""
28+ <!-- <description></description> -->
29+ </snippet>""" .replace (" " , "\t " ) # always use tabs in snippets
2930
3031
3132class NewRawSnippetCommand (sublime_plugin .WindowCommand ):
@@ -43,12 +44,13 @@ def is_enabled(self):
4344 def run (self , edit ):
4445 content = get_text (self .view )
4546 clear (self .view )
46- self .view .run_command ('insert_snippet' , {'contents' : TPL })
47+ self .view .run_command ('insert_snippet' , {'contents' : SNIPPET_TEMPLATE })
4748 self .view .set_syntax_file (SNIPPETS_SYNTAX )
4849 # Insert existing contents into CDATA section. We rely on the fact
4950 # that Sublime will place the first selection in the first field of
5051 # the newly inserted snippet.
5152 self .view .insert (edit , self .view .sel ()[0 ].begin (), content )
53+ self .view .run_command ("next_field" )
5254
5355
5456class NewRawSnippetFromSnippetCommand (sublime_plugin .TextCommand ):
You can’t perform that action at this time.
0 commit comments