add snippets for javascript, markdown, php and xml
This commit is contained in:
parent
9699e53627
commit
ca892f0fcc
|
@ -3,3 +3,9 @@ function $1($2) {
|
||||||
$3
|
$3
|
||||||
}
|
}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet cc "function" bi
|
||||||
|
/**
|
||||||
|
* $1
|
||||||
|
*/
|
||||||
|
endsnippet
|
||||||
|
|
|
@ -7,3 +7,11 @@ endsnippet
|
||||||
snippet img "image" b
|
snippet img "image" b
|
||||||
![$2]($1 "$2")
|
![$2]($1 "$2")
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet fr "Fragment option"
|
||||||
|
<!-- .element: class="fragment" -->
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet sl "Slider option"
|
||||||
|
<!-- .slide: data-menu-title="" data-background-image="" data-transition="" -->
|
||||||
|
endsnippet
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
snippet pf "Create a public function" b
|
snippet pf "Create a public function" b
|
||||||
/*
|
/**
|
||||||
* $3.
|
* $3.
|
||||||
*
|
*
|
||||||
* $4
|
* $4
|
||||||
|
@ -11,7 +11,7 @@ public function $1($2)
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet ppf "Create a protected function" b
|
snippet ppf "Create a protected function" b
|
||||||
/*
|
/**
|
||||||
* $3.
|
* $3.
|
||||||
*
|
*
|
||||||
* $4
|
* $4
|
||||||
|
@ -23,7 +23,7 @@ protected function $1($2)
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet pvf "Create a private function" b
|
snippet pvf "Create a private function" b
|
||||||
/*
|
/**
|
||||||
* $3.
|
* $3.
|
||||||
*
|
*
|
||||||
* $4
|
* $4
|
||||||
|
@ -41,7 +41,7 @@ $1
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet gs "Getter and setter"
|
snippet gs "Getter and setter"
|
||||||
/*
|
/**
|
||||||
* Set the value of "$1".
|
* Set the value of "$1".
|
||||||
*
|
*
|
||||||
* @param $2 \$$1
|
* @param $2 \$$1
|
||||||
|
@ -55,7 +55,7 @@ public function set${1/\w+\s*/\u$0/g}(\$$1)
|
||||||
return \$this;
|
return \$this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Get the value of "$1".
|
* Get the value of "$1".
|
||||||
*
|
*
|
||||||
* @return $2
|
* @return $2
|
||||||
|
@ -366,3 +366,19 @@ class $1
|
||||||
$2
|
$2
|
||||||
}
|
}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet rest "JMS annotation" b
|
||||||
|
/**
|
||||||
|
* @JMS\Serializer\Annotation\SerializedName("$1")
|
||||||
|
* @JMS\Serializer\Annotation\Groups({"$2"})
|
||||||
|
* @JMS\Serializer\Annotation\VirtualProperty
|
||||||
|
*/
|
||||||
|
public function getRest${1/\w+\s*/\u$0/}()
|
||||||
|
{
|
||||||
|
return $this->get${1/\w+\s*/\u$0/}();
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet rest_class "JMS class annotation"
|
||||||
|
* @JMS\Serializer\Annotation\ExclusionPolicy("all")
|
||||||
|
endsnippet
|
||||||
|
|
|
@ -8,6 +8,11 @@ endsnippet
|
||||||
snippet schema "schema"
|
snippet schema "schema"
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<database defaultIdMethod="native" name="default" namespace="$1">
|
<database defaultIdMethod="native" name="default" namespace="$1">
|
||||||
|
<vendor type="mysql">
|
||||||
|
<parameter name="Engine" value="InnoDB" />
|
||||||
|
<parameter name="Charset" value="utf8" />
|
||||||
|
</vendor>
|
||||||
|
|
||||||
$2
|
$2
|
||||||
</database>
|
</database>
|
||||||
endsnippet
|
endsnippet
|
||||||
|
@ -15,19 +20,19 @@ endsnippet
|
||||||
|
|
||||||
snippet table "table"
|
snippet table "table"
|
||||||
<table name="$1" isCrossRef="$2">
|
<table name="$1" isCrossRef="$2">
|
||||||
<column name="id" type="INTEGER" primaryKey="true" required="true" autoIncrement="true"/>
|
<column name="id" type="INTEGER" primaryKey="true" required="true" autoIncrement="true" />
|
||||||
|
|
||||||
<behavior name="timestampable"/>
|
<behavior name="timestampable" />
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<foreign-key foreignTable="foo" onDelete="none" onUpdate="cascade">
|
<foreign-key foreignTable="foo" onDelete="none" onUpdate="cascade">
|
||||||
<reference local="foo_id" foreign="id"/>
|
<reference local="foo_id" foreign="id" />
|
||||||
</foreign-key>
|
</foreign-key>
|
||||||
|
|
||||||
<behavior name="sortable"/>
|
<behavior name="sortable" />
|
||||||
<behavior name="uploadable">
|
<behavior name="uploadable">
|
||||||
<parameter name="fields" value="picture"/>
|
<parameter name="fields" value="picture" />
|
||||||
<parameter name="paths" value="uploads/post/"/>
|
<parameter name="paths" value="uploads/post/" />
|
||||||
</behavior>
|
</behavior>
|
||||||
-->
|
-->
|
||||||
</table>
|
</table>
|
||||||
|
@ -37,8 +42,12 @@ snippet id "id"
|
||||||
<column name="id" type="INTEGER" primaryKey="true" required="true" autoIncrement="true" />
|
<column name="id" type="INTEGER" primaryKey="true" required="true" autoIncrement="true" />
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet float "float"
|
||||||
|
<column name="$1" type="FLOAT" required="false" />
|
||||||
|
endsnippet
|
||||||
|
|
||||||
snippet int "int"
|
snippet int "int"
|
||||||
<column name="$1" type="INTEGER" required="true" />
|
<column name="$1" type="INTEGER" required="false" />
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet varchar "VARCHAR"
|
snippet varchar "VARCHAR"
|
||||||
|
@ -54,28 +63,28 @@ snippet longvarchar "LONGVARCHAR"
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet fk "fk"
|
snippet fk "fk"
|
||||||
<column name="$1_id" type="integer" required="true" />
|
<column name="$1_id" type="INTEGER" required="true" />
|
||||||
|
|
||||||
<foreign-key foreignTable="$1" name="fk_$1x" onDelete="cascade" onUpdate="cascade">
|
<foreign-key foreignTable="$1" onDelete="cascade" onUpdate="cascade">
|
||||||
<reference local="$1_id" foreign="id"/>
|
<reference local="$1_id" foreign="id" />
|
||||||
</foreign-key>
|
</foreign-key>
|
||||||
<index name="fk_$1x_idx">
|
<index>
|
||||||
<index-column name="$1_id" />
|
<index-column name="$1_id" />
|
||||||
</index>
|
</index>
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet sort "sort"
|
snippet sort "sort"
|
||||||
<behavior name="sortable"/>
|
<behavior name="sortable" />
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet time "timestampable"
|
snippet time "timestampable"
|
||||||
<behavior name="timestampable"/>
|
<behavior name="timestampable" />
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet upload "upload"
|
snippet upload "upload"
|
||||||
<behavior name="uploadable">
|
<behavior name="uploadable">
|
||||||
<parameter name="fields" value="$1"/>
|
<parameter name="fields" value="$1" />
|
||||||
<parameter name="paths" value="uploads/$1/"/>
|
<parameter name="paths" value="uploads/$1/" />
|
||||||
</behavior>
|
</behavior>
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
@ -125,7 +134,7 @@ snippet phpunit
|
||||||
processIsolation = "false"
|
processIsolation = "false"
|
||||||
stopOnFailure = "false"
|
stopOnFailure = "false"
|
||||||
syntaxCheck = "true"
|
syntaxCheck = "true"
|
||||||
bootstrap = "vendor/autoload.php" >
|
bootstrap = "vendor/autoload.php">
|
||||||
|
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="$1">
|
<testsuite name="$1">
|
||||||
|
|
Loading…
Reference in a new issue