Permalink
Browse files

Some cleanup and scope correction. This is a total mess.

git-svn-id: http://svn.textmate.org/trunk/Bundles/PHP Smarty.tmbundle@8262 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
1 parent dbe2106 commit 954bb0ce3395c706ef62fcb10a511946e0e1559c @Soryu Soryu committed Oct 6, 2007
@@ -29,7 +29,7 @@ HTML
<key>output</key>
<string>showAsHTML</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>uuid</key>
<string>EB4A8FA5-DFBD-43E9-B091-B1825E49DF33</string>
</dict>
@@ -3,11 +3,11 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>{assign var=$1 value="$2"}</string>
+ <string>{assign var=$1 value=$2</string>
<key>name</key>
<string>Assign</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
<string>{assign</string>
<key>uuid</key>
@@ -7,9 +7,9 @@
<key>name</key>
<string>Capitalize</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
- <string>|capitalize</string>
+ <string>|cap</string>
<key>uuid</key>
<string>F68F299E-A8DC-4E77-88DB-C0956D990838</string>
</dict>
@@ -3,13 +3,11 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>{capture name=#INSERTION#}
-#SELECT#
-{/capture}</string>
+ <string>{capture${1: name=$2}${3: assign=$4}}$0{/capture</string>
<key>name</key>
<string>Capture</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
<string>{capture</string>
<key>uuid</key>
View
@@ -3,11 +3,11 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>|cat:"${1:text to add}"</string>
+ <string>|cat:"${1:lorem ipsum}"</string>
<key>name</key>
<string>Cat</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
<string>|cat</string>
<key>uuid</key>
@@ -3,11 +3,11 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>{config_load file="#INSERTION#" [section="" scope="local|parent|global"] }</string>
+ <string>{config_load file="$1"${2: section="$3"}${4: scope="${5:local|parent|global}"}</string>
<key>name</key>
<string>Config Load</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
<string>{config_load</string>
<key>uuid</key>
@@ -7,9 +7,9 @@
<key>name</key>
<string>Count Characters</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
- <string>|count_characters</string>
+ <string>|count</string>
<key>uuid</key>
<string>27D0C8AD-4DB1-4B7D-AA66-3975F118280E</string>
</dict>
@@ -7,9 +7,9 @@
<key>name</key>
<string>Count Paragraphs</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
- <string>|count_paragraphs</string>
+ <string>|count</string>
<key>uuid</key>
<string>9672F018-FF28-44A3-BC83-F531E0C5FC3A</string>
</dict>
@@ -7,9 +7,9 @@
<key>name</key>
<string>Count Sentences</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
- <string>|count_sentences</string>
+ <string>|count</string>
<key>uuid</key>
<string>544E0BFC-4FC5-4CA3-92E7-94BB104010CB</string>
</dict>
@@ -7,9 +7,9 @@
<key>name</key>
<string>Count Words</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
- <string>|count_words</string>
+ <string>|count</string>
<key>uuid</key>
<string>7C9E548D-E130-4C33-9993-91A6F36D7378</string>
</dict>
@@ -3,12 +3,11 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>{counter name="#INSERTION#" start=1 skip=1 direction="up" print=true assign="foo" }
-{counter}</string>
+ <string>{counter name="$1" start=${2:1}${3: skip=${4:2}}${5: assign="${6}"}</string>
<key>name</key>
<string>Counter</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
<string>{counter</string>
<key>uuid</key>
@@ -3,11 +3,11 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>{cycle values="#SELSTART#foo,bar#SELEND#" name="default" print=true advance=true delimiter="," assign=varname }</string>
+ <string>{cycle values="${1:on},${2:off}"${3: name="${4:name}"}</string>
<key>name</key>
<string>Cycle</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
<string>{cycle</string>
<key>uuid</key>
@@ -3,13 +3,13 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>|date_format:"${1:strftime() formatting}" </string>
+ <string>|date_format:"${1:%b %e, %Y}"</string>
<key>name</key>
<string>Date Format</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
- <string>|date_format</string>
+ <string>|format</string>
<key>uuid</key>
<string>D9C6D3F5-ADB6-4028-A679-479927F2E992</string>
</dict>
@@ -7,9 +7,9 @@
<key>name</key>
<string>Default</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
- <string>|default</string>
+ <string>|def</string>
<key>uuid</key>
<string>1B1ABCA8-8A6D-4DB4-AD18-E64400853873</string>
</dict>
@@ -7,9 +7,9 @@
<key>name</key>
<string>Escape</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
- <string>|escape</string>
+ <string>|esc</string>
<key>uuid</key>
<string>7840DDFE-DADE-47D2-84E6-1D652C186497</string>
</dict>
@@ -3,11 +3,11 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>{fetch file="#SELSTART#http:// or file#SELEND#" assign=varname} </string>
+ <string>{fetch file="${1:filename}"${2: assign=${3:var}}</string>
<key>name</key>
<string>Fetch</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
<string>{fetch</string>
<key>uuid</key>
@@ -3,13 +3,13 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>{foreach from=${1:$varname} item=i [key=k name=""] }
-$2
-{/foreach}</string>
+ <string>{foreach from=\$${1:varname} item=${2:item}${3: key=${4:key}}${5: name=${6:loop1}}}
+ $0
+{/foreach</string>
<key>name</key>
<string>Foreach</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
<string>{foreach</string>
<key>uuid</key>
View
@@ -3,14 +3,13 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>{if ${1:varname}${2:eq,neq,gt,lt,gte,lte,is [not] even|odd,not,mod,div by} "${3:foo}"}
-{* $varname can also be a php call *}
-$4
-{/if}</string>
+ <string>{if $1}
+ $0
+{/if</string>
<key>name</key>
<string>If</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
<string>{if</string>
<key>uuid</key>
@@ -3,13 +3,13 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>{include file="$1" [assign=varname foo="bar"] }</string>
+ <string>{include file="$1"${2: assign=${3:var}}</string>
<key>name</key>
<string>Include</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
- <string>{include</string>
+ <string>{inc</string>
<key>uuid</key>
<string>D68BA3F9-D7BE-40E5-9223-71EA2618076F</string>
</dict>
@@ -3,13 +3,13 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>{ldelim}</string>
+ <string>{ldelim</string>
<key>name</key>
<string>Ldelim</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
- <string>{ldelim</string>
+ <string>{ld</string>
<key>uuid</key>
<string>4321D130-75F2-4A15-BF54-CBE08D3DAE77</string>
</dict>
@@ -3,15 +3,13 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>{literal}
-$1
-{/literal}</string>
+ <string>{literal}$1{/literal</string>
<key>name</key>
<string>Literal</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
- <string>{literal</string>
+ <string>{lit</string>
<key>uuid</key>
<string>AF397507-436C-4AB0-B164-7A84E1F5768B</string>
</dict>
View
@@ -3,11 +3,11 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>{math equation="${1:1+x}" assign=$2 ${3:x=8}} </string>
+ <string>{math equation="${1:1+x}" assign=$2 ${3:x=8}</string>
<key>name</key>
<string>Math</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
<string>{math</string>
<key>uuid</key>
@@ -7,9 +7,9 @@
<key>name</key>
<string>Rdelim</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
- <string>{rdelim</string>
+ <string>{rd</string>
<key>uuid</key>
<string>C59DF8F8-6E5D-4F5A-BB0D-11EAF2ACD273</string>
</dict>
@@ -3,13 +3,13 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>|regex_replace:"${1:regex}":"$2" </string>
+ <string>|regex_replace:"/${1:.*}/":"$2"</string>
<key>name</key>
<string>Regex Replace</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
- <string>|regex_replace</string>
+ <string>|regex</string>
<key>uuid</key>
<string>B2D2BE2D-900B-418F-8414-F90A0A8D8AB0</string>
</dict>
@@ -7,7 +7,7 @@
<key>name</key>
<string>Replace</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
<string>|replace</string>
<key>uuid</key>
@@ -3,13 +3,13 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>|string_format:"${1:sprintf formatting}" </string>
+ <string>|string_format:"${1:%.2f}"</string>
<key>name</key>
<string>String Format</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
- <string>|string_format</string>
+ <string>|format</string>
<key>uuid</key>
<string>F6E2E40A-B7D1-452A-883B-F4BF393ABA30</string>
</dict>
@@ -4,12 +4,12 @@
<dict>
<key>content</key>
<string>{strip}
-$1
-{/strip}</string>
+ $1
+{/strip</string>
<key>name</key>
<string>Strip</string>
<key>scope</key>
- <string>text.html.smarty</string>
+ <string>source.smarty</string>
<key>tabTrigger</key>
<string>{strip</string>
<key>uuid</key>
Oops, something went wrong.

0 comments on commit 954bb0c

Please sign in to comment.