Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent tab-triggers for snippets when in phpdoc scope #40

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions Commands/Insert Call to Parent.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,23 @@ for ($x = $functionToken + 1; $x < $numTokens; $x++) {
echo "parent::{$functionName}(" . implode(', ', $params) . ');$0';</string>
<key>input</key>
<string>document</string>
<key>inputFormat</key>
<string>text</string>
<key>name</key>
<string>Insert Call to Parent</string>
<key>output</key>
<string>insertAsSnippet</string>
<key>outputCaret</key>
<string>afterOutput</string>
<key>outputFormat</key>
<string>snippet</string>
<key>outputLocation</key>
<string>replaceSelection</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>parent</string>
<key>uuid</key>
<string>978B5E5E-F5C6-4FD8-B346-B0C85883D600</string>
<key>version</key>
<integer>2</integer>
</dict>
</plist>
4 changes: 2 additions & 2 deletions Snippets/$GLOBALS[''].tmSnippet
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>\$GLOBALS['${1:variable}']${2: = }${3:something}${4:;}$0</string>
<key>name</key>
<string>$GLOBALS['…']</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>globals</string>
<key>uuid</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/$_COOKIE[''].tmSnippet
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>\$_COOKIE['${1:variable}']</string>
<key>name</key>
<string>COOKIE['…']</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>$_</string>
<key>uuid</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/$_ENV[''].tmSnippet
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>\$_ENV['${1:variable}']</string>
<key>name</key>
<string>ENV['…']</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>$_</string>
<key>uuid</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/$_FILES[''].tmSnippet
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>\$_FILES['${1:variable}']</string>
<key>name</key>
<string>FILES['…']</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>$_</string>
<key>uuid</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/$_GET[''].tmSnippet
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>\$_GET['${1:variable}']</string>
<key>name</key>
<string>GET['…']</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>$_</string>
<key>uuid</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/$_POST[''].tmSnippet
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>\$_POST['${1:variable}']</string>
<key>name</key>
<string>POST['…']</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>$_</string>
<key>uuid</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/$_REQUEST[''].tmSnippet
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>\$_REQUEST['${1:variable}']</string>
<key>name</key>
<string>REQUEST['…']</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>$_</string>
<key>uuid</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/$_SERVER[''].tmSnippet
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>\$_SERVER['${1:variable}']</string>
<key>name</key>
<string>SERVER['…']</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>$_</string>
<key>uuid</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/$_SESSION[''].tmSnippet
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>\$_SESSION['${1:variable}']</string>
<key>name</key>
<string>SESSION['…']</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>$_</string>
<key>uuid</key>
Expand Down
2 changes: 1 addition & 1 deletion Snippets/<?php ?>.tmSnippet
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>name</key>
<string>&lt;?php … ?&gt;</string>
<key>scope</key>
<string>text.html.php</string>
<string>text.html.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>php</string>
<key>uuid</key>
Expand Down
2 changes: 1 addition & 1 deletion Snippets/<?php echo ___ ?>.tmSnippet
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>name</key>
<string>&lt;?php echo … ?&gt;</string>
<key>scope</key>
<string>text.html.php</string>
<string>text.html.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>echo</string>
<key>uuid</key>
Expand Down
2 changes: 1 addition & 1 deletion Snippets/<?php echo htmlentities(___) ?>.tmSnippet
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>name</key>
<string>&lt;?php echo htmlentities(…) ?&gt;</string>
<key>scope</key>
<string>text.html.php</string>
<string>text.html.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>echoh</string>
<key>uuid</key>
Expand Down
2 changes: 1 addition & 1 deletion Snippets/<?php else: ?>.tmSnippet
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>name</key>
<string>&lt;?php else: ?&gt;</string>
<key>scope</key>
<string>text.html.php</string>
<string>text.html.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>else</string>
<key>uuid</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>name</key>
<string>&lt;?php foreach (…) … &lt;?php endforeach ?&gt;</string>
<key>scope</key>
<string>text.html.php</string>
<string>text.html.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>foreach</string>
<key>uuid</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>name</key>
<string>&lt;?php if (…) ?&gt; … &lt;?php else ?&gt; … &lt;?php endif ?&gt;</string>
<key>scope</key>
<string>text.html.php</string>
<string>text.html.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>ifelse</string>
<key>uuid</key>
Expand Down
2 changes: 1 addition & 1 deletion Snippets/<?php if (___) ?> ___ <?php endif ?>.tmSnippet
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>name</key>
<string>&lt;?php if (…) ?&gt; … &lt;?php endif ?&gt;</string>
<key>scope</key>
<string>text.html.php</string>
<string>text.html.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>if</string>
<key>uuid</key>
Expand Down
2 changes: 1 addition & 1 deletion Snippets/?>…<?php.tmSnippet
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>name</key>
<string>?&gt;…&lt;?php</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>php</string>
<key>uuid</key>
Expand Down
2 changes: 1 addition & 1 deletion Snippets/Constructor.tmSnippet
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>name</key>
<string>function __construct</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>con</string>
<key>uuid</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/Heredoc.tmSnippet
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ $1;
<key>name</key>
<string>Heredoc</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>&lt;&lt;&lt;</string>
<string>&lt;&lt;&lt; - comment.block.documentation.phpdoc.php</string>
<key>uuid</key>
<string>1634287E-035A-4617-9AD8-09133183F8FE</string>
</dict>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/Include TextMate Support Script.tmSnippet
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
Expand All @@ -16,7 +16,7 @@ fi`
<key>name</key>
<string>Include TextMate Support Script</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>tmphp</string>
<key>uuid</key>
Expand Down
2 changes: 1 addition & 1 deletion Snippets/class { }.tmSnippet
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ${2:ClassName}${3: extends ${4:AnotherClass}}
<key>name</key>
<string>class …</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>class</string>
<key>uuid</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/define( ).tmSnippet
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
Expand All @@ -8,7 +8,7 @@ $0</string>
<key>name</key>
<string>define(…, …)</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>def</string>
<key>uuid</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/defined( ).tmSnippet
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>$1defined('$2')$0</string>
<key>name</key>
<string>defined(…)</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>def?</string>
<key>uuid</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/do while( ).tmSnippet
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
Expand All @@ -9,7 +9,7 @@
<key>name</key>
<string>do … while …</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>do</string>
<key>uuid</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/echo ___.tmSnippet
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>echo "${1:string}"${0};</string>
<key>name</key>
<string>echo "…"</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>echo</string>
<key>uuid</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/else {}.tmSnippet
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
Expand All @@ -9,7 +9,7 @@
<key>name</key>
<string>else …</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>else</string>
<key>uuid</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/elseif( ).tmSnippet
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
Expand All @@ -9,7 +9,7 @@
<key>name</key>
<string>elseif …</string>
<key>scope</key>
<string>source.php</string>
<string>source.php - comment.block.documentation.phpdoc.php</string>
<key>tabTrigger</key>
<string>elseif</string>
<key>uuid</key>
Expand Down
Loading