Removed unnecessary whitespace from the end of the line
This commit is contained in:
parent
df74813351
commit
b6ba92b409
@ -16,17 +16,17 @@ snippet lorem
|
||||
snippet GPL2
|
||||
${1:One line to give the program's name and a brief description.}
|
||||
Copyright (C) `strftime("%Y")` ${2:copyright holder}
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
@ -34,17 +34,17 @@ snippet GPL2
|
||||
snippet LGPL2
|
||||
${1:One line to give the program's name and a brief description.}
|
||||
Copyright (C) `strftime("%Y")` ${2:copyright holder}
|
||||
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published
|
||||
by the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
@ -52,35 +52,35 @@ snippet LGPL2
|
||||
snippet GPL3
|
||||
${1:one line to give the program's name and a brief description.}
|
||||
Copyright (C) `strftime("%Y")` ${2:copyright holder}
|
||||
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
${3}
|
||||
snippet LGPL3
|
||||
${1:One line to give the program's name and a brief description.}
|
||||
Copyright (C) `strftime("%Y")` ${2:copyright holder}
|
||||
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published
|
||||
by the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
@ -89,7 +89,7 @@ snippet BSD2
|
||||
${1:one line to give the program's name and a brief description}
|
||||
Copyright (C) `strftime("%Y")` ${2:copyright holder}
|
||||
All rights reserved.
|
||||
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
@ -97,7 +97,7 @@ snippet BSD2
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY $2 ''AS IS'' AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
@ -108,9 +108,9 @@ snippet BSD2
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
The views and conclusions contained in the software and documentation
|
||||
|
||||
|
||||
The views and conclusions contained in the software and documentation
|
||||
are those of the authors and should not be interpreted as representing
|
||||
official policies, either expressedor implied, of $2.
|
||||
|
||||
@ -119,7 +119,7 @@ snippet BSD3
|
||||
${1:one line to give the program's name and a brief description}
|
||||
Copyright (C) `strftime("%Y")` ${2:copyright holder}
|
||||
All rights reserved.
|
||||
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
@ -130,7 +130,7 @@ snippet BSD3
|
||||
3. Neither the name of the ${3:organization} nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY $2 ''AS IS'' AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
@ -147,7 +147,7 @@ snippet BSD4
|
||||
${1:one line to give the program's name and a brief description}
|
||||
Copyright (C) `strftime("%Y")` ${2:copyright holder}
|
||||
All rights reserved.
|
||||
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
@ -161,7 +161,7 @@ snippet BSD4
|
||||
4. Neither the name of the $3 nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY $2 ''AS IS'' AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
@ -177,17 +177,17 @@ snippet BSD4
|
||||
snippet MIT
|
||||
${1:one line to give the program's name and a brief description}
|
||||
Copyright (C) `strftime("%Y")` ${2:copyright holder}
|
||||
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
@ -200,13 +200,13 @@ snippet MIT
|
||||
snippet APACHE
|
||||
${1:one line to give the program's name and a brief description}
|
||||
Copyright `strftime("%Y")` ${2:copyright holder}
|
||||
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@ -214,14 +214,14 @@ snippet APACHE
|
||||
limitations under the License.
|
||||
|
||||
${3}
|
||||
snippet BEERWARE
|
||||
snippet BEERWARE
|
||||
${2:one line to give the program's name and a brief description}
|
||||
Copyright `strftime("%Y")` ${3:copyright holder}
|
||||
|
||||
|
||||
Licensed under the "THE BEER-WARE LICENSE" (Revision 42):
|
||||
${1:`g:snips_author`} wrote this file. As long as you retain this notice you
|
||||
can do whatever you want with this stuff. If we meet some day, and you think
|
||||
this stuff is worth it, you can buy me a beer or coffee in return
|
||||
this stuff is worth it, you can buy me a beer or coffee in return
|
||||
|
||||
${4}
|
||||
|
||||
|
@ -2,22 +2,22 @@ snippet main
|
||||
package {
|
||||
import flash.display.*;
|
||||
import flash.Events.*;
|
||||
|
||||
|
||||
public class Main extends Sprite {
|
||||
public function Main ( ) {
|
||||
trace("start");
|
||||
stage.scaleMode = StageScaleMode.NO_SCALE;
|
||||
stage.addEventListener(Event.RESIZE, resizeListener);
|
||||
}
|
||||
|
||||
|
||||
private function resizeListener (e:Event):void {
|
||||
trace("The application window changed size!");
|
||||
trace("New width: " + stage.stageWidth);
|
||||
trace("New height: " + stage.stageHeight);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
snippet class
|
||||
${1:public|internal} class ${2:name} ${3:extends } {
|
||||
|
@ -6,7 +6,7 @@ snippet dir
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
</Directory>
|
||||
# <FilesMatch>
|
||||
# <FilesMatch>
|
||||
snippet filesmatch
|
||||
<FilesMatch "${1:regex}">
|
||||
${2}
|
||||
|
@ -14,7 +14,7 @@ snippet mainn
|
||||
return 0;
|
||||
}
|
||||
##
|
||||
## Preprocessor
|
||||
## Preprocessor
|
||||
# #include <...>
|
||||
snippet inc
|
||||
#include <${1:stdio}.h>${2}
|
||||
@ -230,5 +230,5 @@ snippet gpl
|
||||
*
|
||||
* Copyright (C) ${1:Author}, `strftime("%Y")`
|
||||
*/
|
||||
|
||||
|
||||
${2}
|
||||
|
@ -141,7 +141,7 @@ snippet svn
|
||||
${12:#}svn_username ${13} # (Subversion only) Username for Subversion operations
|
||||
${14:#}svn_password ${15} # (Subversion only) Password for Subversion operations
|
||||
${16:#}svn_arguments ${17} # (Subversion only) Extra arguments passed to the subversion command
|
||||
|
||||
|
||||
${18:#}${19:action :sync} # Update the source to the specified revision, or get a new checkout (Default)
|
||||
${20:#}${21:action :checkout} # Checkout the source. Does nothing if a checkout is available
|
||||
${22:#}${23:action :export} # Export the source, excluding or removing any version control artifacts
|
||||
@ -159,7 +159,7 @@ snippet git
|
||||
${14:#}enable_submodules ${15:"false"} # (Git only) performs a submodule init and submodule update
|
||||
${16:#}remote ${17:"origin"} # (Git only) remote repository to use for syncing an existing clone
|
||||
${18:#}ssh_wrapper ${19} # (Git only) path to a wrapper script for running SSH with git. GIT_SSH environment variable is set to this.
|
||||
|
||||
|
||||
${20:#}${21:action :sync} # Update the source to the specified revision, or get a new clone (Default)
|
||||
${22:#}${23:action :checkout} # Clone the source. Does nothing if a checkout is available
|
||||
${24:#}${25:action :export} # Export the source, excluding or removing any version control artifacts
|
||||
@ -197,7 +197,7 @@ snippet deploy
|
||||
${54:#}before_symlink ${55:"deploy/before_symlink.rb"} # A block or path to a file containing chef code to run before symlinking
|
||||
${56:#}before_restart ${57:"deploy/before_restart.rb"} # A block or path to a file containing chef code to run before restarting
|
||||
${58:#}after_restart ${59:"deploy/after_restart.rb"} # A block or path to a file containing chef code to run after restarting
|
||||
|
||||
|
||||
${60:#}${61::deploy} # Deploy the application (Default)
|
||||
${62:#}${63::force_deploy} # For the revision deploy strategy, this removes any existing release of the same code version and re-deploys in its place
|
||||
${64:#}${65::rollback} # Rollback the application to the previous release
|
||||
|
@ -43,7 +43,7 @@ snippet if
|
||||
(if ${1:test-expr}
|
||||
${2:then-expr}
|
||||
${3:else-expr})
|
||||
snippet if-let
|
||||
snippet if-let
|
||||
(if-let [${1:result} ${2:test-expr}]
|
||||
(${3:then-expr} $1)
|
||||
(${4:else-expr}))
|
||||
|
@ -39,7 +39,7 @@ snippet link
|
||||
TARGET_LINK_LIBRARIES(${1:bin}
|
||||
${2:somelib}
|
||||
)
|
||||
|
||||
|
||||
snippet bin
|
||||
ADD_EXECUTABLE(${1:bin})
|
||||
|
||||
@ -52,7 +52,7 @@ snippet dep
|
||||
)
|
||||
|
||||
snippet props
|
||||
SET_TARGET_PROPERTIES(${1:target}
|
||||
${2:PROPERTIES} ${3:COMPILE_FLAGS}
|
||||
SET_TARGET_PROPERTIES(${1:target}
|
||||
${2:PROPERTIES} ${3:COMPILE_FLAGS}
|
||||
${4:"-O3 -Wall -pedantic"}
|
||||
)
|
||||
|
@ -64,11 +64,11 @@ snippet fr
|
||||
# mutable
|
||||
snippet mu
|
||||
mutable
|
||||
##
|
||||
##
|
||||
## Class
|
||||
# class
|
||||
snippet cl
|
||||
class ${1:`Filename('$1', 'name')`}
|
||||
class ${1:`Filename('$1', 'name')`}
|
||||
{
|
||||
public:
|
||||
$1(${2});
|
||||
@ -97,7 +97,7 @@ snippet cin
|
||||
std::cin >> ${1};${2}
|
||||
##
|
||||
## Iteration
|
||||
# for i
|
||||
# for i
|
||||
snippet fori
|
||||
for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) {
|
||||
${4}
|
||||
|
@ -1,12 +1,12 @@
|
||||
# cs.snippets
|
||||
# ===========
|
||||
#
|
||||
#
|
||||
# Standard C-Sharp snippets for snipmate.
|
||||
#
|
||||
# Largely ported over from Visual Studio 2010 snippets plus
|
||||
# a few snippets from Resharper plus a few widely known snippets.
|
||||
#
|
||||
# Most snippets on elements (i.e. classes, properties)
|
||||
# Most snippets on elements (i.e. classes, properties)
|
||||
# follow suffix conventions. The order of suffixes to a snippet
|
||||
# is fixed.
|
||||
#
|
||||
@ -55,13 +55,13 @@
|
||||
# * Events
|
||||
#
|
||||
# Feedback is welcome!
|
||||
#
|
||||
#
|
||||
# entry point
|
||||
snippet sim
|
||||
public static int Main(string[] args) {
|
||||
${1}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
snippet simc
|
||||
public class Application {
|
||||
public static int Main(string[] args) {
|
||||
@ -73,13 +73,13 @@ snippet simc
|
||||
snippet if
|
||||
if (${1}) {
|
||||
${2}
|
||||
}
|
||||
}
|
||||
snippet el
|
||||
else {
|
||||
${1}
|
||||
}
|
||||
}
|
||||
snippet ifs
|
||||
if (${1})
|
||||
if (${1})
|
||||
${2}
|
||||
# ternary conditional
|
||||
snippet t
|
||||
|
@ -73,16 +73,16 @@ snippet model
|
||||
class ${1:ModelName}(models.Model):
|
||||
"""${2:docstring}"""
|
||||
${3}
|
||||
|
||||
|
||||
class Meta:
|
||||
${4}
|
||||
|
||||
|
||||
def __unicode__(self):
|
||||
${5}
|
||||
|
||||
|
||||
def save(self, force_insert=False, force_update=False):
|
||||
${6}
|
||||
|
||||
|
||||
@models.permalink
|
||||
def get_absolute_url(self):
|
||||
return ('${7:view_or_url_name}' ${8})
|
||||
@ -90,9 +90,9 @@ snippet model
|
||||
snippet modeladmin
|
||||
class ${1:ModelName}Admin(admin.ModelAdmin):
|
||||
${2}
|
||||
|
||||
|
||||
admin.site.register($1, $1Admin)
|
||||
|
||||
|
||||
snippet tabularinline
|
||||
class ${1:ModelName}Inline(admin.TabularInline):
|
||||
model = $1
|
||||
|
@ -1,12 +1,12 @@
|
||||
# module and export all
|
||||
snippet mod
|
||||
-module(${1:`Filename('', 'my')`}).
|
||||
|
||||
|
||||
-compile([export_all]).
|
||||
|
||||
|
||||
start() ->
|
||||
${2}
|
||||
|
||||
|
||||
stop() ->
|
||||
ok.
|
||||
# define directive
|
||||
@ -81,7 +81,7 @@ snippet application
|
||||
end.
|
||||
|
||||
stop(_State) ->
|
||||
ok.
|
||||
ok.
|
||||
# OTP supervisor
|
||||
snippet supervisor
|
||||
-module(${1:`Filename('', 'my')`}).
|
||||
|
@ -1,15 +1,15 @@
|
||||
snippet #!
|
||||
#!/usr/bin/env falcon
|
||||
|
||||
# Import
|
||||
# Import
|
||||
snippet imp
|
||||
import ${1:module}
|
||||
|
||||
# Function
|
||||
snippet fun
|
||||
function ${2:function_name}(${3})
|
||||
function ${2:function_name}(${3})
|
||||
${4}
|
||||
end
|
||||
end
|
||||
|
||||
# Class
|
||||
snippet class
|
||||
@ -17,35 +17,35 @@ snippet class
|
||||
${3:/* members/methods */}
|
||||
end
|
||||
|
||||
# If
|
||||
# If
|
||||
snippet if
|
||||
if ${1:condition}
|
||||
${2}
|
||||
${2}
|
||||
end
|
||||
|
||||
# If else
|
||||
snippet ife
|
||||
if ${1:condition}
|
||||
${2}
|
||||
${2}
|
||||
else
|
||||
${1}
|
||||
${1}
|
||||
end
|
||||
|
||||
# If else if
|
||||
# If else if
|
||||
snippet elif
|
||||
elif ${1:condition}
|
||||
${2}
|
||||
${2}
|
||||
|
||||
# Switch case
|
||||
snippet switch
|
||||
switch ${1:expression}
|
||||
case ${2:item}
|
||||
case ${3:item}
|
||||
default
|
||||
default
|
||||
end
|
||||
|
||||
# Select
|
||||
snippet select
|
||||
snippet select
|
||||
select ${1:variable}
|
||||
case ${2:TypeSpec}
|
||||
case ${3:TypeSpec}
|
||||
@ -65,7 +65,7 @@ snippet forto
|
||||
end
|
||||
|
||||
# While Loop
|
||||
snippet while
|
||||
snippet while
|
||||
while ${1:conidition}
|
||||
${2}
|
||||
${2}
|
||||
end
|
||||
|
@ -4,7 +4,7 @@ snippet ap
|
||||
# bool
|
||||
snippet bl
|
||||
bool
|
||||
# byte
|
||||
# byte
|
||||
snippet bt
|
||||
byte
|
||||
# break
|
||||
@ -29,7 +29,7 @@ snippet co
|
||||
# continue
|
||||
snippet cn
|
||||
continue
|
||||
# defer
|
||||
# defer
|
||||
snippet df
|
||||
defer ${1:func}()
|
||||
# defer recover
|
||||
@ -57,20 +57,20 @@ snippet gpl
|
||||
*
|
||||
* Copyright (C) ${1:Author}, `strftime("%Y")`
|
||||
*/
|
||||
|
||||
|
||||
${2}
|
||||
# int
|
||||
snippet i
|
||||
int
|
||||
# import
|
||||
# import
|
||||
snippet im
|
||||
import (
|
||||
"${1:package}"
|
||||
"${1:package}"
|
||||
)${2}
|
||||
# interface
|
||||
# interface
|
||||
snippet in
|
||||
interface{}
|
||||
# full interface snippet
|
||||
# full interface snippet
|
||||
snippet inf
|
||||
interface ${1:name} {
|
||||
${2:/* methods */}
|
||||
@ -126,13 +126,13 @@ snippet fr
|
||||
${4}
|
||||
}
|
||||
${5}
|
||||
# function simple
|
||||
# function simple
|
||||
snippet fun
|
||||
func ${1:funcName}(${2}) ${3:error} {
|
||||
${4}
|
||||
}
|
||||
${5}
|
||||
# function on receiver
|
||||
# function on receiver
|
||||
snippet fum
|
||||
func (self ${1:type}) ${2:funcName}(${3}) ${4:error} {
|
||||
${5}
|
||||
@ -147,7 +147,7 @@ snippet lp
|
||||
# make
|
||||
snippet mk
|
||||
make(${1:[]string}, ${2:0})
|
||||
# map
|
||||
# map
|
||||
snippet mp
|
||||
map[${1:string}]${2:int}
|
||||
# main()
|
||||
@ -159,19 +159,19 @@ snippet main
|
||||
# new
|
||||
snippet nw
|
||||
new(${1:type})
|
||||
# panic
|
||||
# panic
|
||||
snippet pn
|
||||
panic("${1:msg}")
|
||||
# print
|
||||
snippet pr
|
||||
fmt.Printf("%${1:s}\n", ${2:var})${3}
|
||||
# range
|
||||
# range
|
||||
snippet rn
|
||||
range ${1}
|
||||
# return
|
||||
# return
|
||||
snippet rt
|
||||
return ${1}
|
||||
# result
|
||||
# result
|
||||
snippet rs
|
||||
result
|
||||
# select
|
||||
@ -193,7 +193,7 @@ snippet st
|
||||
${2:/* data */}
|
||||
}
|
||||
${3}
|
||||
# switch
|
||||
# switch
|
||||
snippet sw
|
||||
switch ${1:var} {
|
||||
case ${2:value1}:
|
||||
@ -205,7 +205,7 @@ snippet sw
|
||||
}
|
||||
snippet sp
|
||||
fmt.Sprintf("%${1:s}", ${2:var})${3}
|
||||
# true
|
||||
# true
|
||||
snippet t
|
||||
true
|
||||
# variable declaration
|
||||
|
@ -48,7 +48,7 @@ snippet ap
|
||||
${1:map} ${2:fn} ${3:list}
|
||||
snippet do
|
||||
do
|
||||
|
||||
|
||||
snippet λ
|
||||
\${1:x} -> ${2}
|
||||
snippet \
|
||||
|
@ -28,7 +28,7 @@ snippet if
|
||||
${2}
|
||||
{% end %}
|
||||
snippet elif
|
||||
{% elif ${1:condition} %}
|
||||
{% elif ${1:condition} %}
|
||||
snippet else
|
||||
{% else %}
|
||||
snippet import
|
||||
|
@ -47,7 +47,7 @@ snippet tc
|
||||
##
|
||||
## Class Enhancements
|
||||
snippet ext
|
||||
extends
|
||||
extends
|
||||
snippet imp
|
||||
implements
|
||||
##
|
||||
|
@ -140,7 +140,7 @@ snippet sing
|
||||
$1 = function $1($2) {
|
||||
return instance;
|
||||
};
|
||||
|
||||
|
||||
// carry over the prototype properties
|
||||
$1.prototype = this;
|
||||
|
||||
@ -154,7 +154,7 @@ snippet sing
|
||||
|
||||
return instance;
|
||||
}
|
||||
# Crockford's object function
|
||||
# Crockford's object function
|
||||
snippet obj
|
||||
function object(o) {
|
||||
function F() {}
|
||||
@ -164,7 +164,7 @@ snippet obj
|
||||
# Define multiple properties
|
||||
snippet props
|
||||
var ${1:my_object} = Object.defineProperties(
|
||||
${2:new Object()},
|
||||
${2:new Object()},
|
||||
{
|
||||
${3:property} : {
|
||||
get : function $1_$3_getter() {
|
||||
@ -182,9 +182,9 @@ snippet props
|
||||
);
|
||||
# Define single property
|
||||
snippet prop
|
||||
Object.defineProperty(
|
||||
Object.defineProperty(
|
||||
${1:object},
|
||||
"${2:property}",
|
||||
"${2:property}",
|
||||
{
|
||||
get : function $1_$2_getter() {
|
||||
// getter code
|
||||
|
@ -24,11 +24,11 @@ snippet ![:*
|
||||
|
||||
snippet ===
|
||||
`repeat('=', strlen(getline(line(".") - 1)))`
|
||||
|
||||
|
||||
${1}
|
||||
snippet ---
|
||||
`repeat('-', strlen(getline(line(".") - 1)))`
|
||||
|
||||
|
||||
${1}
|
||||
|
||||
snippet blockquote
|
||||
|
@ -55,4 +55,4 @@ snippet log
|
||||
snippet dec
|
||||
DECIMAL
|
||||
snippet sep
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Snippets for use with VIM and http://www.vim.org/scripts/script.php?script_id=2540
|
||||
#
|
||||
# Please contact R.I.Pienaar <rip@devco.net> for additions and feedback,
|
||||
# Please contact R.I.Pienaar <rip@devco.net> for additions and feedback,
|
||||
# see it in action @ http://www.devco.net/archives/2009/09/22/vim_and_puppet.php
|
||||
|
||||
# Language Constructs
|
||||
@ -25,7 +25,7 @@ snippet ife
|
||||
snippet if
|
||||
if $${1:variable} {
|
||||
${2}
|
||||
}
|
||||
}
|
||||
snippet else
|
||||
else {
|
||||
${1}
|
||||
@ -34,7 +34,7 @@ snippet ?
|
||||
? {
|
||||
'${1}' => ${2}
|
||||
}
|
||||
#
|
||||
#
|
||||
# blocks etc and general syntax sugar
|
||||
snippet [
|
||||
[ ${1} ]${2}
|
||||
@ -54,7 +54,7 @@ snippet defined
|
||||
defined(${1:Resource}["${2:name}"])${3}
|
||||
snippet emerg
|
||||
emerg("${1:message}")${2}
|
||||
snippet extlookup Simple extlookup
|
||||
snippet extlookup Simple extlookup
|
||||
extlookup("${1:variable}")${2}
|
||||
snippet extlookup Extlookup with defaults
|
||||
extlookup("${1:variable}", "${2:default}")${3}
|
||||
|
@ -140,7 +140,7 @@ snippet test
|
||||
# test case
|
||||
snippet testcase
|
||||
class ${1:ExampleCase}(unittest.TestCase):
|
||||
|
||||
|
||||
def test_${2:description}(self):
|
||||
${3}
|
||||
snippet fut
|
||||
@ -151,7 +151,7 @@ snippet getopt
|
||||
# Short option syntax: "hv:"
|
||||
# Long option syntax: "help" or "verbose="
|
||||
opts, args = getopt.getopt(sys.argv[1:], "${1:short_options}", [${2:long_options}])
|
||||
|
||||
|
||||
except getopt.GetoptError, err:
|
||||
# Print debug info
|
||||
print str(err)
|
||||
|
@ -117,5 +117,5 @@ snippet cor
|
||||
cor.test(${1:x}, ${2:y})
|
||||
snippet fte
|
||||
var.test(${1:x}, ${2:y})
|
||||
snippet kvt
|
||||
snippet kvt
|
||||
kv.test(${1:x}, ${2:y})
|
||||
|
@ -30,7 +30,7 @@ snippet cont:
|
||||
${1:content}
|
||||
snippet code:
|
||||
.. code:: ${1:type}
|
||||
|
||||
|
||||
${2:write some code}
|
||||
snippet tip:
|
||||
.. tip::
|
||||
@ -59,11 +59,11 @@ snippet cau:
|
||||
#Spinx only
|
||||
snippet sid:
|
||||
.. sidebar:: ${1:Title}
|
||||
|
||||
${2}
|
||||
|
||||
${2}
|
||||
# CJK optimize, CJK has no space between charaters
|
||||
snippet *c
|
||||
\ *${1:Emphasis}*\ ${2}
|
||||
\ *${1:Emphasis}*\ ${2}
|
||||
snippet **c
|
||||
\ **${1:Strong emphasis}**\ ${2}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Shebang. Executing bash via /usr/bin/env makes scripts more portable.
|
||||
snippet #!
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
snippet if
|
||||
if [[ ${1:condition} ]]; then
|
||||
${2:#statements}
|
||||
@ -30,9 +30,9 @@ snippet case
|
||||
${2:pattern})
|
||||
${3};;
|
||||
esac
|
||||
snippet go
|
||||
while getopts '${1:o}' ${2:opts}
|
||||
do
|
||||
snippet go
|
||||
while getopts '${1:o}' ${2:opts}
|
||||
do
|
||||
case $$2 in
|
||||
${3:o0})
|
||||
${4:#staments};;
|
||||
@ -53,9 +53,9 @@ snippet getopt
|
||||
{
|
||||
cat <<- EOT
|
||||
|
||||
Usage : $${0:0} [options] [--]
|
||||
Usage : $${0:0} [options] [--]
|
||||
|
||||
Options:
|
||||
Options:
|
||||
-h|help Display this message
|
||||
-v|version Display script version
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# #!/usr/bin/env tclsh
|
||||
snippet #!
|
||||
#!/usr/bin/env tclsh
|
||||
|
||||
|
||||
# Process
|
||||
snippet pro
|
||||
proc ${1:function_name} {${2:args}} {
|
||||
|
@ -27,4 +27,4 @@ snippet fn
|
||||
[${1:ref number}] ${3}
|
||||
|
||||
fn$1. ${2:footnote}
|
||||
|
||||
|
||||
|
@ -50,7 +50,7 @@ snippet import
|
||||
|
||||
snippet include
|
||||
<xsl:include href="${1:stylesheet}" />${2}
|
||||
|
||||
|
||||
snippet otherwise
|
||||
<xsl:otherwise>${1}
|
||||
</xsl:otherwise>
|
||||
@ -64,7 +64,7 @@ snippet stylesheet
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">${1}
|
||||
</xsl:stylesheet>
|
||||
|
||||
snippet template
|
||||
snippet template
|
||||
<xsl:template match="${1:*}">${3}
|
||||
</xsl:template>
|
||||
|
||||
@ -91,7 +91,7 @@ snippet when
|
||||
|
||||
snippet with-param
|
||||
<xsl:with-param name="${1:name}">${2}</xsl:with-param>
|
||||
|
||||
|
||||
snippet with-param select
|
||||
<xsl:with-param name="${1:name}" select="${2:*}" />
|
||||
|
||||
|
||||
|
@ -1,59 +1,59 @@
|
||||
#--------------------Yii CHtml---------------------------------
|
||||
#Yii CHtml::radioButton
|
||||
snippet yhrb
|
||||
echo CHtml::radioButton('${1:name}', ${2:false},array(${3:optionName}=>${4:optionValue} );
|
||||
echo CHtml::radioButton('${1:name}', ${2:false},array(${3:optionName}=>${4:optionValue} );
|
||||
|
||||
#Yii CHtml::asset
|
||||
snippet yhass
|
||||
echo CHtml::asset('${1:path}');
|
||||
echo CHtml::asset('${1:path}');
|
||||
|
||||
#Yii CHtml::activeLabelEx
|
||||
snippet yhale
|
||||
echo CHtml::activeLabelEx(${1:model}, '${2:attribute}',array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::activeLabelEx(${1:model}, '${2:attribute}',array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::encodeArray
|
||||
snippet yheca
|
||||
echo CHtml::encodeArray(array(${1}));
|
||||
echo CHtml::encodeArray(array(${1}));
|
||||
|
||||
#Yii CHtml::normalizeUrl
|
||||
snippet yhnurl
|
||||
echo CHtml::normalizeUrl(array('${1}'));
|
||||
echo CHtml::normalizeUrl(array('${1}'));
|
||||
|
||||
#Yii CHtml::resetButton
|
||||
snippet yhsb
|
||||
echo CHtml::submitButton('${1:label}',array('${2:optionName}'=>${3:optionValue}));
|
||||
echo CHtml::submitButton('${1:label}',array('${2:optionName}'=>${3:optionValue}));
|
||||
|
||||
#Yii CHtml::linkButton
|
||||
snippet yhlinkb
|
||||
echo CHtml::linkButton('${1:lable}',array('${2:optionName}'=>${3:optionValue}));
|
||||
echo CHtml::linkButton('${1:lable}',array('${2:optionName}'=>${3:optionValue}));
|
||||
|
||||
#Yii CHtml::activeTextArea
|
||||
snippet yhata
|
||||
echo CHtml::activeTextArea(${1:model}, '${2:attribute}',array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::activeTextArea(${1:model}, '${2:attribute}',array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::ajaxButton
|
||||
snippet yhajb
|
||||
echo CHtml::ajaxButton('${1:label}', '${2:url}',array('${3:ajaxOptionName}'=>${4:ajaxOptionValue}),array('${5:optionName}'=>${6:optionValue}));
|
||||
echo CHtml::ajaxButton('${1:label}', '${2:url}',array('${3:ajaxOptionName}'=>${4:ajaxOptionValue}),array('${5:optionName}'=>${6:optionValue}));
|
||||
|
||||
#Yii CHtml::activeId
|
||||
snippet yhai
|
||||
echo CHtml::activeId(${1:model}, '${2:attribute}');
|
||||
echo CHtml::activeId(${1:model}, '${2:attribute}');
|
||||
|
||||
#Yii CHtml::activeCheckBox
|
||||
snippet yhacb
|
||||
echo CHtml::activeCheckBox(${1:model}, '${2:attribute}',array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::activeCheckBox(${1:model}, '${2:attribute}',array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::activeHiddenField
|
||||
snippet yhahf
|
||||
echo CHtml::activeHiddenField(${1:model}, '${2:attribute}',array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::activeHiddenField(${1:model}, '${2:attribute}',array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::encode
|
||||
snippet yhec
|
||||
echo CHtml::encode(${1:text});
|
||||
echo CHtml::encode(${1:text});
|
||||
|
||||
#Yii CHtml::metaTag
|
||||
snippet yhmtag
|
||||
echo CHtml::metaTag('${1:content}', '${2:name}', '${3:httpEquiv}',array('${4:optionName}'=>${5:optionValue}));
|
||||
echo CHtml::metaTag('${1:content}', '${2:name}', '${3:httpEquiv}',array('${4:optionName}'=>${5:optionValue}));
|
||||
|
||||
#Yii CHtml::dropDownList
|
||||
snippet yhddl
|
||||
@ -61,167 +61,167 @@ snippet yhddl
|
||||
|
||||
#Yii CHtml::listBox
|
||||
snippet yhlb
|
||||
echo CHtml::listBox('${1:name}', '${2:select}',array(${3}),array('${4:optionName}'=>${5:optionValue}));
|
||||
echo CHtml::listBox('${1:name}', '${2:select}',array(${3}),array('${4:optionName}'=>${5:optionValue}));
|
||||
|
||||
#Yii CHtml::script
|
||||
snippet yhjs
|
||||
echo CHtml::script('${1:test}');
|
||||
echo CHtml::script('${1:test}');
|
||||
|
||||
#Yii CHtml::ajax
|
||||
snippet yhaj
|
||||
echo CHtml::ajax(array(${1}));
|
||||
echo CHtml::ajax(array(${1}));
|
||||
|
||||
#Yii CHtml::textField
|
||||
snippet yhtf
|
||||
echo CHtml::textField('${1:name}', '${2:value}',array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::textField('${1:name}', '${2:value}',array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::activePasswordField
|
||||
snippet yhapf
|
||||
echo CHtml::activePasswordField(${1:model}, '${2:attribute}',array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::activePasswordField(${1:model}, '${2:attribute}',array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::listData
|
||||
snippet yhld
|
||||
echo CHtml::listData(array(${1}),'${2:valueField}', '${3:textField}','${4:groupField}');
|
||||
echo CHtml::listData(array(${1}),'${2:valueField}', '${3:textField}','${4:groupField}');
|
||||
|
||||
#Yii CHtml::mailto
|
||||
snippet yhmt
|
||||
echo CHtml::mailto('${1:text}', '${2:email}',array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::mailto('${1:text}', '${2:email}',array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::image
|
||||
snippet yhimg
|
||||
echo CHtml::image('${1:src}', '${2:alt}',array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::image('${1:src}', '${2:alt}',array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::activeListBox
|
||||
snippet yhalb
|
||||
echo CHtml::activeListBox(${1:model}, '${2:attribute}', array(${3}),array('${4:optionName}'=>${5:optionValue}));
|
||||
echo CHtml::activeListBox(${1:model}, '${2:attribute}', array(${3}),array('${4:optionName}'=>${5:optionValue}));
|
||||
|
||||
#Yii CHtml::activeFileField
|
||||
snippet yhaff
|
||||
echo CHtml::activeFileField(${1:model}, '${2:attribute}',array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::activeFileField(${1:model}, '${2:attribute}',array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::closeTag
|
||||
snippet yhct
|
||||
echo CHtml::closeTag('${1:tag}');
|
||||
echo CHtml::closeTag('${1:tag}');
|
||||
|
||||
#Yii CHtml::activeInputField
|
||||
snippet yhaif
|
||||
echo CHtml::activeInputField('${1:type}', ${2:model}, '${3:attribute}',array('${4:optionName}'=>${5:optionValue}));
|
||||
echo CHtml::activeInputField('${1:type}', ${2:model}, '${3:attribute}',array('${4:optionName}'=>${5:optionValue}));
|
||||
|
||||
#Yii CHtml::scriptFile
|
||||
snippet yhjsf
|
||||
echo CHtml::scriptFile('${1:url}');
|
||||
echo CHtml::scriptFile('${1:url}');
|
||||
|
||||
#Yii CHtml::radioButtonList
|
||||
snippet yhrbl
|
||||
echo CHtml::radioButtonList('${1:name}', ${2:select}, array(${3}),array('${4:optionName}'=>${5:optionValue}));
|
||||
echo CHtml::radioButtonList('${1:name}', ${2:select}, array(${3}),array('${4:optionName}'=>${5:optionValue}));
|
||||
|
||||
#Yii CHtml::cssFile
|
||||
snippet yhcssf
|
||||
echo CHtml::cssFile('${1:url}','${2:media}');
|
||||
echo CHtml::cssFile('${1:url}','${2:media}');
|
||||
|
||||
#Yii CHtml::error
|
||||
snippet yherr
|
||||
echo CHtml::error(${1:model}, '${2:attribute}');
|
||||
echo CHtml::error(${1:model}, '${2:attribute}');
|
||||
|
||||
#Yii CHtml::passwordField
|
||||
snippet yhpf
|
||||
echo CHtml::passwordField('${1:name}', '${2:value}',array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::passwordField('${1:name}', '${2:value}',array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::hiddenField
|
||||
snippet yhhf
|
||||
echo CHtml::hiddenField('${1:name}', '${2:value}',array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::hiddenField('${1:name}', '${2:value}',array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::cdata
|
||||
snippet yhc
|
||||
echo CHtml::cdata(${1:text});
|
||||
echo CHtml::cdata(${1:text});
|
||||
|
||||
#Yii CHtml::link
|
||||
snippet yhlink
|
||||
echo CHtml::link('${1:text}',array(${2}),array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::link('${1:text}',array(${2}),array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::errorSummary
|
||||
snippet yherrs
|
||||
echo CHtml::errorSummary(${1:model},'${2:headerHtml}','${3:footerHtml}');
|
||||
echo CHtml::errorSummary(${1:model},'${2:headerHtml}','${3:footerHtml}');
|
||||
|
||||
#Yii CHtml::tag
|
||||
snippet yht
|
||||
echo CHtml::tag('${1:tag}',array('${2:optionName}'=>${3:optionValue}),${4:false},${5:true});
|
||||
echo CHtml::tag('${1:tag}',array('${2:optionName}'=>${3:optionValue}),${4:false},${5:true});
|
||||
|
||||
#Yii CHtml::ajaxLink
|
||||
snippet yhajl
|
||||
echo CHtml::ajaxLink('${1:label}', '${2:url}',array('${3:ajaxOptionName}'=>${4:ajaxOptionValue}),array('${5:optionName}'=>${6:optionValue}));
|
||||
echo CHtml::ajaxLink('${1:label}', '${2:url}',array('${3:ajaxOptionName}'=>${4:ajaxOptionValue}),array('${5:optionName}'=>${6:optionValue}));
|
||||
|
||||
#Yii CHtml::label
|
||||
snippet yhlabel
|
||||
echo CHtml::label('${1:label}', '${2:for}',array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::label('${1:label}', '${2:for}',array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::activeName
|
||||
snippet yhan
|
||||
echo CHtml::activeName(${1:model}, '${2:attribute}');
|
||||
echo CHtml::activeName(${1:model}, '${2:attribute}');
|
||||
|
||||
#Yii CHtml::statefulForm
|
||||
snippet yhsform
|
||||
echo CHtml::statefulForm(array('${1}'), '${2:post}',array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::statefulForm(array('${1}'), '${2:post}',array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::fileField
|
||||
snippet yhff
|
||||
echo CHtml::fileField('${1:name}', '${2:value}',array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::fileField('${1:name}', '${2:value}',array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::activeTextField
|
||||
snippet yhatf
|
||||
echo CHtml::activeTextField(${1:model}, '${2:attribute}',array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::activeTextField(${1:model}, '${2:attribute}',array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::css
|
||||
snippet yhcss
|
||||
echo CHtml::css('${1:test}','${2:media}');
|
||||
echo CHtml::css('${1:test}','${2:media}');
|
||||
|
||||
#Yii CHtml::imageButton
|
||||
snippet yhimgb
|
||||
echo CHtml::imageButton('${1:src}',array('${2:optionName}'=>${3:optionValue}));
|
||||
echo CHtml::imageButton('${1:src}',array('${2:optionName}'=>${3:optionValue}));
|
||||
|
||||
#Yii CHtml::ajaxSubmitButton
|
||||
snippet yhajsb
|
||||
echo CHtml::ajaxSubmitButton('${1:label}', '${2:url}',array('${3:ajaxOptionName}'=>${4:ajaxOptionValue}),array('${5:optionName}'=>${6:optionValue}));
|
||||
echo CHtml::ajaxSubmitButton('${1:label}', '${2:url}',array('${3:ajaxOptionName}'=>${4:ajaxOptionValue}),array('${5:optionName}'=>${6:optionValue}));
|
||||
|
||||
#Yii CHtml::button
|
||||
snippet yhb
|
||||
echo CHtml::button('${1:label}',array('${2:optionName}'=>${3:optionValue}));
|
||||
echo CHtml::button('${1:label}',array('${2:optionName}'=>${3:optionValue}));
|
||||
|
||||
#Yii CHtml::listOptions
|
||||
snippet yhlo
|
||||
echo CHtml::listOptions('${1:selection}', array(${2}), array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::listOptions('${1:selection}', array(${2}), array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::activeCheckBoxList
|
||||
snippet yhacbl
|
||||
echo CHtml::activeCheckBoxList(${1:model}, '${2:attribute}', array(${3}),array('${4:optionName}'=>${5:optionValue}));
|
||||
echo CHtml::activeCheckBoxList(${1:model}, '${2:attribute}', array(${3}),array('${4:optionName}'=>${5:optionValue}));
|
||||
|
||||
#Yii CHtml::openTag
|
||||
snippet yhot
|
||||
echo CHtml::openTag('${1:tag}', array('${2:optionName}'=>${3:optionValue}));
|
||||
echo CHtml::openTag('${1:tag}', array('${2:optionName}'=>${3:optionValue}));
|
||||
|
||||
#Yii CHtml::checkBox
|
||||
snippet yhcb
|
||||
echo CHtml::checkBox('${1:name}', ${2:false}, array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::checkBox('${1:name}', ${2:false}, array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::textArea
|
||||
snippet yhta
|
||||
echo CHtml::textArea('${1:name}', '${2:value}',array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::textArea('${1:name}', '${2:value}',array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::linkTag
|
||||
snippet yhlinkt
|
||||
echo CHtml::linkTag('${1:relation}', '${2:type}', '${3:href}', '${4:media}',array('${5:optionName}'=>${6:optionValue}));
|
||||
echo CHtml::linkTag('${1:relation}', '${2:type}', '${3:href}', '${4:media}',array('${5:optionName}'=>${6:optionValue}));
|
||||
|
||||
#Yii CHtml::resetButton
|
||||
snippet yhrsb
|
||||
echo CHtml::resetButton('${1:label}',array('${2:optionName}'=>${3:optionValue}));
|
||||
echo CHtml::resetButton('${1:label}',array('${2:optionName}'=>${3:optionValue}));
|
||||
|
||||
#Yii CHtml::activeRadioButtonList
|
||||
snippet yharbl
|
||||
echo CHtml::activeRadioButtonList(${1:model}, '${2:attribute}', array(${3}),array('${4:optionName}'=>${5:optionValue}));
|
||||
echo CHtml::activeRadioButtonList(${1:model}, '${2:attribute}', array(${3}),array('${4:optionName}'=>${5:optionValue}));
|
||||
|
||||
#Yii CHtml::checkBoxList
|
||||
snippet yhcbl
|
||||
echo CHtml::checkBoxList('${1:name}', ${2:select}, array(${3}),array('${4:optionName}'=>${5:optionValue}));
|
||||
echo CHtml::checkBoxList('${1:name}', ${2:select}, array(${3}),array('${4:optionName}'=>${5:optionValue}));
|
||||
|
||||
#Yii CHtml::form
|
||||
snippet yhform
|
||||
@ -231,18 +231,18 @@ snippet yhform
|
||||
snippet yhbeform
|
||||
echo CHtml::beginForm(array('${1}'), '${2:post}',array('${3:optionName}'=>${4:optionValue}));
|
||||
${5}
|
||||
echo CHtml::endForm();
|
||||
echo CHtml::endForm();
|
||||
|
||||
#Yii CHtml::activeDropDownList
|
||||
snippet yhaddl
|
||||
echo CHtml::activeDropDownList(${1:model}, '${2:attribute}', array(${3}),array('${4:optionName}'=>${5:optionValue}));
|
||||
echo CHtml::activeDropDownList(${1:model}, '${2:attribute}', array(${3}),array('${4:optionName}'=>${5:optionValue}));
|
||||
|
||||
#Yii CHtml::activeRadioButton
|
||||
snippet yharb
|
||||
echo CHtml::activeRadioButton(${1:model}, '${2:attribute}',array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::activeRadioButton(${1:model}, '${2:attribute}',array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
#Yii CHtml::activeLabel
|
||||
snippet yhal
|
||||
echo CHtml::activeLabel(${1:model}, '${2:attribute}',array('${3:optionName}'=>${4:optionValue}));
|
||||
echo CHtml::activeLabel(${1:model}, '${2:attribute}',array('${3:optionName}'=>${4:optionValue}));
|
||||
|
||||
|
||||
|
@ -1,58 +1,58 @@
|
||||
#Yii session offset
|
||||
snippet yse
|
||||
Yii::app()->session['${1}'];
|
||||
Yii::app()->session['${1}'];
|
||||
|
||||
#Yii renderDynamic
|
||||
snippet yrd
|
||||
$this->renderDynamic('${1:callback}');
|
||||
$this->renderDynamic('${1:callback}');
|
||||
|
||||
#Yii set cache
|
||||
snippet ycas
|
||||
Yii::app()->cache->set('${1:key}', ${2:value}, ${3:expire}, new C${4:}CacheDependency(${5}));
|
||||
Yii::app()->cache->set('${1:key}', ${2:value}, ${3:expire}, new C${4:}CacheDependency(${5}));
|
||||
|
||||
#Yii Add cache
|
||||
snippet ycad
|
||||
Yii::app()->cache->add('${1:key}', ${2:value}, ${3:expire}, new C${4}CacheDependency(${5}));
|
||||
Yii::app()->cache->add('${1:key}', ${2:value}, ${3:expire}, new C${4}CacheDependency(${5}));
|
||||
|
||||
#Yii register CSS file
|
||||
snippet yregcf
|
||||
Yii::app()->clientScript->registerCssFile('${1:file}');
|
||||
Yii::app()->clientScript->registerCssFile('${1:file}');
|
||||
|
||||
#Yii requestType
|
||||
snippet yreqtype
|
||||
Yii::app()->request->requestType
|
||||
Yii::app()->request->requestType
|
||||
|
||||
#Yii isAjaxRequest
|
||||
snippet yisajax
|
||||
Yii::app()->request->isAjaxRequest
|
||||
Yii::app()->request->isAjaxRequest
|
||||
|
||||
#Yii translate
|
||||
snippet yt
|
||||
Yii::t('${1:category}', '${2:message}',array(${3}));
|
||||
Yii::t('${1:category}', '${2:message}',array(${3}));
|
||||
|
||||
#Yii register CSS
|
||||
snippet yregc
|
||||
Yii::app()->clientScript->registerCss('${1:id}', '${2}');
|
||||
Yii::app()->clientScript->registerCss('${1:id}', '${2}');
|
||||
|
||||
#Yii log
|
||||
snippet ylog
|
||||
Yii::log('${1:msg}', '${2:info}');
|
||||
Yii::log('${1:msg}', '${2:info}');
|
||||
|
||||
#Yii userHostAddress
|
||||
snippet yuserip
|
||||
YYii::app()->request->userHostAddress
|
||||
YYii::app()->request->userHostAddress
|
||||
|
||||
#Yii register script file
|
||||
snippet yregsf
|
||||
Yii::app()->clientScript->registerScriptFile('${1:scriptUrl}', CClientScript::POS_${2:END});
|
||||
Yii::app()->clientScript->registerScriptFile('${1:scriptUrl}', CClientScript::POS_${2:END});
|
||||
|
||||
#Yii CLinkPager
|
||||
snippet ylinkpager
|
||||
$this->widget('CLinkPager', array('pages'=>$pages,'header'=>'${1}'}))
|
||||
$this->widget('CLinkPager', array('pages'=>$pages,'header'=>'${1}'}))
|
||||
|
||||
#Yii CJSON::encode
|
||||
snippet yjec
|
||||
CJSON::encode(${1:text});
|
||||
CJSON::encode(${1:text});
|
||||
|
||||
#CActiveDataProvider
|
||||
snippet yadp
|
||||
@ -68,23 +68,23 @@ snippet yadp
|
||||
),
|
||||
));
|
||||
${6}
|
||||
// $dataProvider->getData() will return a list of Post objects
|
||||
// $dataProvider->getData() will return a list of Post objects
|
||||
|
||||
#Yii renderDynamic internal
|
||||
snippet yrdi
|
||||
$this->renderDynamic('${1:callback}', array('${2:key}'=>${3:value}));
|
||||
$this->renderDynamic('${1:callback}', array('${2:key}'=>${3:value}));
|
||||
|
||||
#Yii register script
|
||||
snippet yregs
|
||||
Yii::app()->clientScript->registerScript('${1:id}', '${2}', CClientScript::POS_${3:READY});
|
||||
Yii::app()->clientScript->registerScript('${1:id}', '${2}', CClientScript::POS_${3:READY});
|
||||
|
||||
#Yii Flush cache
|
||||
snippet ycaf
|
||||
Yii::app()->cache->flush();
|
||||
Yii::app()->cache->flush();
|
||||
|
||||
#Yii Yii::app()->request->cookies
|
||||
snippet yco
|
||||
Yii::app()->request->cookies['${1}']
|
||||
Yii::app()->request->cookies['${1}']
|
||||
|
||||
#Yii user->
|
||||
snippet yuser
|
||||
@ -92,54 +92,54 @@ snippet yuser
|
||||
|
||||
#Yii refresh
|
||||
snippet yrf
|
||||
$this->refresh();
|
||||
$this->refresh();
|
||||
|
||||
#Yii import
|
||||
snippet yimp
|
||||
Yii::import('${1}');
|
||||
Yii::import('${1}');
|
||||
|
||||
#Yii trace
|
||||
snippet ytrace
|
||||
Yii::trace('${1:msg}');
|
||||
Yii::trace('${1:msg}');
|
||||
|
||||
#Yii params
|
||||
snippet ypar
|
||||
Yii::app()->params['${1}']
|
||||
Yii::app()->params['${1}']
|
||||
|
||||
#Yii isPostRequest
|
||||
snippet yispost
|
||||
Yii::app()->request->isPostRequest
|
||||
Yii::app()->request->isPostRequest
|
||||
|
||||
#Yii IF isAjaxRequest
|
||||
snippet yifisajax
|
||||
if(Yii::app()->request->isAjaxRequest == TRUE)
|
||||
{
|
||||
${1}
|
||||
}
|
||||
}
|
||||
|
||||
#Yii Yii::app()->cache->delete
|
||||
snippet ydelcache
|
||||
Yii::app()->cache->delete('${1:key}');
|
||||
Yii::app()->cache->delete('${1:key}');
|
||||
|
||||
#Yii render view
|
||||
snippet yr
|
||||
$this->render('${1:view}',array('${2:key}'=>${3:value}));
|
||||
$this->render('${1:view}',array('${2:key}'=>${3:value}));
|
||||
|
||||
#Yii redirect
|
||||
snippet yre
|
||||
$this->redirect(array('${1:controller}/${2:action}'));
|
||||
$this->redirect(array('${1:controller}/${2:action}'));
|
||||
|
||||
#Yii Get cache
|
||||
snippet ycag
|
||||
Yii::app()->cache->get('${1:key}');
|
||||
Yii::app()->cache->get('${1:key}');
|
||||
|
||||
#Yii render text
|
||||
snippet yrt
|
||||
$this->renderText('${1}');
|
||||
$this->renderText('${1}');
|
||||
|
||||
#Yii render partial
|
||||
snippet yrp
|
||||
$this->renderPartial('${1:view}',array('${2:key}'=>${3:value}));
|
||||
$this->renderPartial('${1:view}',array('${2:key}'=>${3:value}));
|
||||
|
||||
#----------------Yii Model-----------------------------
|
||||
#Yii Model count
|
||||
@ -152,7 +152,7 @@ snippet ycountbs
|
||||
|
||||
#Yii Model updateAll
|
||||
snippet yupdatea
|
||||
${1:ModelName}::model()->updateAll(${2:array('attributes')}, ${3:condition},array('${4:key}'=>${5:value}));
|
||||
${1:ModelName}::model()->updateAll(${2:array('attributes')}, ${3:condition},array('${4:key}'=>${5:value}));
|
||||
|
||||
#Yii Model updateByPk
|
||||
snippet yupdatebp
|
||||
@ -164,35 +164,35 @@ snippet ydela
|
||||
|
||||
#Yii Model deleteByPk
|
||||
snippet ydelbp
|
||||
${1:ModelName}::model()->deleteByPk(${2:pk}, ${3:condition}, array('${4:key}'=>${5:value}));
|
||||
${1:ModelName}::model()->deleteByPk(${2:pk}, ${3:condition}, array('${4:key}'=>${5:value}));
|
||||
|
||||
#Yii Model find
|
||||
snippet yfind
|
||||
${1:ModelName}::model()->find(${2:condition},array('${3:key}'=>${4:value}));
|
||||
${1:ModelName}::model()->find(${2:condition},array('${3:key}'=>${4:value}));
|
||||
|
||||
#Yii Model findAll
|
||||
snippet yfinda
|
||||
${1:ModelName}::model()->findAll(${2:condition},array('${3:key}'=>${4:value}));
|
||||
${1:ModelName}::model()->findAll(${2:condition},array('${3:key}'=>${4:value}));
|
||||
|
||||
#Yii Model findByPk
|
||||
snippet yfindbp
|
||||
${1:ModelName}::model()->findByPk(${2:pk}, ${3:condition}, array('${4:key}'=>${5:value}));
|
||||
${1:ModelName}::model()->findByPk(${2:pk}, ${3:condition}, array('${4:key}'=>${5:value}));
|
||||
|
||||
#Yii Model findAllByPk
|
||||
snippet yfindabp
|
||||
${1:ModelName}::model()->findAllByPk(${2:pk}, ${3:condition},array('${4:key}'=>${5:value}));
|
||||
${1:ModelName}::model()->findAllByPk(${2:pk}, ${3:condition},array('${4:key}'=>${5:value}));
|
||||
|
||||
#Yii Model findBySql
|
||||
snippet yfindbs
|
||||
${1:ModelName}::model()->findBySql(${2:sql}, array('${3:key}'=>${4:value}));
|
||||
${1:ModelName}::model()->findBySql(${2:sql}, array('${3:key}'=>${4:value}));
|
||||
|
||||
#Yii Model findAllByAttributes
|
||||
snippet yfindaba
|
||||
${1:ModelName}::model()->findAllByAttributes(array('${2:attributeName}'=>${3:attributeValue}), ${4:condition}, array('${5:key}'=>${6:value}));
|
||||
${1:ModelName}::model()->findAllByAttributes(array('${2:attributeName}'=>${3:attributeValue}), ${4:condition}, array('${5:key}'=>${6:value}));
|
||||
|
||||
#Yii Model exists
|
||||
snippet yexists
|
||||
${1:ModelName}::model()->exists(${2:condition}, array('${3:key}'=>${4:value}));
|
||||
${1:ModelName}::model()->exists(${2:condition}, array('${3:key}'=>${4:value}));
|
||||
|
||||
#Yii Create model class
|
||||
snippet ymodel
|
||||
@ -245,7 +245,7 @@ snippet ymodel
|
||||
}
|
||||
}
|
||||
|
||||
#------------Yii Controller------------------------------------
|
||||
#------------Yii Controller------------------------------------
|
||||
|
||||
#Yii Create controller class
|
||||
snippet ycontroller
|
||||
|
Loading…
Reference in New Issue
Block a user