sublimetext2 - sublime text 2 snippet error - Empty Key? -


sublime text 2 snippet parsing error

here error:

error parsing content snippet packages/user/servlet-definition.sublime-snippet: empty key 

and here code:

<snippet>     <content><![cdata[     <servlet>         <servlet-name>$1</servlet-name>         <servlet-class>${2:spray.servlet.servlet30connectorservlet}</servlet-class>         <async-supported>${3:true}</async-supported>     </servlet>      <servlet-mapping>         <servlet-name>$1</servlet-name>         <url-pattern>$(4:/*}</url-pattern>     </servlet-mapping>      ${5} ]]></content>     <!-- optional: set tabtrigger define how trigger snippet -->     <tabtrigger>sdef</tabtrigger>     <!-- optional: set scope limit snippet trigger -->     <!-- <scope>xml</scope> --> </snippet> 

the problem isn't sublime text 2 thinks you're using regular expression, it's $(4:/*} should enclosed just brackets, not parenthesis , bracket. now, sublime text wondering why $ isn't part of variable. use ${4:/*} instead, , should fine.

also, can use $0 define the exit position cursor—it looks you're using $5 purpose, problem in future if want add more fields.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -