Skip to content
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.

Commit

Permalink
+ scope to all snippet
Browse files Browse the repository at this point in the history
* class snippet (restful)
; now base64 -> fbase64
  • Loading branch information
uonick committed Apr 26, 2015
1 parent ff3284e commit 8ae0cec
Show file tree
Hide file tree
Showing 60 changed files with 116 additions and 84 deletions.
8 changes: 4 additions & 4 deletions fatfree-afterroute.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<snippet>
<content><![CDATA[
function afterRoute(){
# Defines
\$f3=\$this->framework;
\$db=\$this->db;
# Code
# Code
${1:CodeHere}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fafter</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free After route</description>
</snippet>
4 changes: 2 additions & 2 deletions fatfree-audit-email.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ Audit::instance()->email(${1:email}, FALSE)
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fauditmail</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<description>Fat-Free email snippet</description>
<scope>source.php</scope>
<description>Fat-Free email audit</description>
</snippet>
4 changes: 2 additions & 2 deletions fatfree-base.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fbase</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<description>Fat-Free base template snippet</description>
<scope>text.html</scope>
<description>Fat-Free BASE url</description>
</snippet>
4 changes: 2 additions & 2 deletions fatfree-base64.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
\$f3->base64(${1:data},${2:type})
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fbase</tabTrigger>
<tabTrigger>fbase64</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free base64</description>
</snippet>
8 changes: 4 additions & 4 deletions fatfree-beforeroute.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<snippet>
<content><![CDATA[
function beforeRoute(){
# Defines
\$f3=\$this->framework;
\$db=\$this->db;
# Code
# Code
${1:CodeHere}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fbefore</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free Before route</description>
</snippet>
4 changes: 2 additions & 2 deletions fatfree-begin.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fbegin</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<description>Fat-Free DB begin</description>
<scope>source.php</scope>
<description>Fat-Free DB commit transaction</description>
</snippet>
1 change: 1 addition & 0 deletions fatfree-cast.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fcast</tabTrigger>
<scope>source.php</scope>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<description>Fat-Free convert obj2array</description>
</snippet>
5 changes: 2 additions & 3 deletions fatfree-check.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<snippet>
<content><![CDATA[
<check if="{{ isset(@${1:value})}}">
<true>
<true>
${2:html}
</true>
</check>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fcheck</tabTrigger>
<scope>text.html</scope>
<description>Check Template</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->

</snippet>
52 changes: 41 additions & 11 deletions fatfree-class.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,24 +1,54 @@
<snippet>
<content><![CDATA[
class ${1:Classname} extends ${2:Parent}{
function ${3:method}(){
# Defines
\$f3=\$this->framework;
\$db=\$this->db;
<?php
# Code
${4:Code}
# Render
echo Template::instance()->render('${5:Template}.html');
class ${1:ClassName} extends ${2:Parent}{
function ${3:index}(){
${4:code}
}
function get() {
}
function post() {
}
function put() {
}
function delete() {
}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fclass</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free new Class template</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-clear.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fclear</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free clear key</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-commit.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fcomm</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free DB commit</description>
</snippet>
1 change: 1 addition & 0 deletions fatfree-compile.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fcomp</tabTrigger>
<scope>source.php</scope>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<description>Fat-Free JS-style token to PHP expression</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-concat.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ $f3->concat(${1:key_one},${2:key_two});
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fconcat</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free concat</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-config.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fconfig</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free config</description>
</snippet>
6 changes: 3 additions & 3 deletions fatfree-controller.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ class ${1:Controller} {
function __construct() {
\$f3=Base::instance();
\$dbuser=\$f3->get('${2:dbuser}');
\$dbpasswd=\$f3->get('${3:dbpasswd}');
\$dbname=\$f3->get('${4:dbname}');
\$db=new DB\SQL(
'mysql:host=localhost;port=3306;dbname='.\$dbname, \$dbuser, \$dbpasswd);
\$this->framework=\$f3;
Expand All @@ -24,6 +24,6 @@ class ${1:Controller} {
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fcontr</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free Controller snippet</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-copy.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fcopy</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free copy</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-copyfrom.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fcopyfrom</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free copyFrom</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-copyto.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fcopyto</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free copyto</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-csv.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fcsv</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free Flatten array values and return as CSV string</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-dbcount.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fcount</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat_Free db rows count</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-dbexec.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fexec</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free DB exec</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-dry.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ if (${1:object}->dry()) {
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fdry</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>fdry</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-dump.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fdump</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free Dump expression (with syntax highlighting)</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-erase.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ ${1:\$mapper}->erase();
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>ferase</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free Delete record from DB</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-error.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>ferror</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free error</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-exists.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fexists</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free exists key</description>
</snippet>
1 change: 1 addition & 0 deletions fatfree-fprint.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
{{ print_r(@${1:value})}}
]]></content>
<tabTrigger>fprint</tabTrigger>
<scope>text.html</scope>
<description>Fat-Free print_r() in template</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-get.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fget</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free Get statement</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-hash.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fhash</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free hash string</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-includetag.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>finc</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>text.html</scope>
<description>Fat-Free include tag</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-insert.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>finsert</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free insert to db</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-lastinsert.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>flast</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free insert (last insert id)</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-load.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fload</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free load after mapper</description>
</snippet>
2 changes: 1 addition & 1 deletion fatfree-log.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>flog</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<scope>source.php</scope>
<description>Fat-Free echo log</description>
</snippet>
1 change: 1 addition & 0 deletions fatfree-loop.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
</loop>
]]></content>
<tabTrigger>floop</tabTrigger>
<scope>text.html</scope>
</snippet>
Loading

0 comments on commit 8ae0cec

Please sign in to comment.