Removed unnecessary whitespace from the end of the line

This commit is contained in:
Michael Thessel 2013-06-20 14:39:31 -07:00 committed by Marc Weber
parent 4eb88d7993
commit 5da33b7a01
29 changed files with 231 additions and 231 deletions

View File

@ -16,17 +16,17 @@ snippet lorem
snippet GPL2 snippet GPL2
${1:One line to give the program's name and a brief description.} ${1:One line to give the program's name and a brief description.}
Copyright (C) `strftime("%Y")` ${2:copyright holder} Copyright (C) `strftime("%Y")` ${2:copyright holder}
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of 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 General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>. along with this program; if not, see <http://www.gnu.org/licenses/>.
@ -34,17 +34,17 @@ snippet GPL2
snippet LGPL2 snippet LGPL2
${1:One line to give the program's name and a brief description.} ${1:One line to give the program's name and a brief description.}
Copyright (C) `strftime("%Y")` ${2:copyright holder} Copyright (C) `strftime("%Y")` ${2:copyright holder}
This library is free software; you can redistribute it and/or modify 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 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 by the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version. (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of 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. GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License 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/>. along with this library; if not, see <http://www.gnu.org/licenses/>.
@ -52,35 +52,35 @@ snippet LGPL2
snippet GPL3 snippet GPL3
${1:one line to give the program's name and a brief description.} ${1:one line to give the program's name and a brief description.}
Copyright (C) `strftime("%Y")` ${2:copyright holder} Copyright (C) `strftime("%Y")` ${2:copyright holder}
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of 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 General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
${3} ${3}
snippet LGPL3 snippet LGPL3
${1:One line to give the program's name and a brief description.} ${1:One line to give the program's name and a brief description.}
Copyright (C) `strftime("%Y")` ${2:copyright holder} Copyright (C) `strftime("%Y")` ${2:copyright holder}
This library is free software; you can redistribute it and/or modify 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 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 by the Free Software Foundation; either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of 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. GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License 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/>. 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} ${1:one line to give the program's name and a brief description}
Copyright (C) `strftime("%Y")` ${2:copyright holder} Copyright (C) `strftime("%Y")` ${2:copyright holder}
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright 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 2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution. documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY $2 ''AS IS'' AND ANY THIS SOFTWARE IS PROVIDED BY $2 ''AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 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 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 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 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 are those of the authors and should not be interpreted as representing
official policies, either expressedor implied, of $2. 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} ${1:one line to give the program's name and a brief description}
Copyright (C) `strftime("%Y")` ${2:copyright holder} Copyright (C) `strftime("%Y")` ${2:copyright holder}
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright 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 3. Neither the name of the ${3:organization} nor the
names of its contributors may be used to endorse or promote products names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission. derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY $2 ''AS IS'' AND ANY THIS SOFTWARE IS PROVIDED BY $2 ''AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 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} ${1:one line to give the program's name and a brief description}
Copyright (C) `strftime("%Y")` ${2:copyright holder} Copyright (C) `strftime("%Y")` ${2:copyright holder}
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright 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 4. Neither the name of the $3 nor the
names of its contributors may be used to endorse or promote products names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission. derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY $2 ''AS IS'' AND ANY THIS SOFTWARE IS PROVIDED BY $2 ''AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -177,17 +177,17 @@ snippet BSD4
snippet MIT snippet MIT
${1:one line to give the program's name and a brief description} ${1:one line to give the program's name and a brief description}
Copyright (C) `strftime("%Y")` ${2:copyright holder} Copyright (C) `strftime("%Y")` ${2:copyright holder}
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"), a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, 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: Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software. in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@ -200,13 +200,13 @@ snippet MIT
snippet APACHE snippet APACHE
${1:one line to give the program's name and a brief description} ${1:one line to give the program's name and a brief description}
Copyright `strftime("%Y")` ${2:copyright holder} Copyright `strftime("%Y")` ${2:copyright holder}
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -214,14 +214,14 @@ snippet APACHE
limitations under the License. limitations under the License.
${3} ${3}
snippet BEERWARE snippet BEERWARE
${2:one line to give the program's name and a brief description} ${2:one line to give the program's name and a brief description}
Copyright `strftime("%Y")` ${3:copyright holder} Copyright `strftime("%Y")` ${3:copyright holder}
Licensed under the "THE BEER-WARE LICENSE" (Revision 42): Licensed under the "THE BEER-WARE LICENSE" (Revision 42):
${1:`g:snips_author`} wrote this file. As long as you retain this notice you ${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 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} ${4}

View File

@ -2,22 +2,22 @@ snippet main
package { package {
import flash.display.*; import flash.display.*;
import flash.Events.*; import flash.Events.*;
public class Main extends Sprite { public class Main extends Sprite {
public function Main ( ) { public function Main ( ) {
trace("start"); trace("start");
stage.scaleMode = StageScaleMode.NO_SCALE; stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, resizeListener); stage.addEventListener(Event.RESIZE, resizeListener);
} }
private function resizeListener (e:Event):void { private function resizeListener (e:Event):void {
trace("The application window changed size!"); trace("The application window changed size!");
trace("New width: " + stage.stageWidth); trace("New width: " + stage.stageWidth);
trace("New height: " + stage.stageHeight); trace("New height: " + stage.stageHeight);
} }
} }
} }
snippet class snippet class
${1:public|internal} class ${2:name} ${3:extends } { ${1:public|internal} class ${2:name} ${3:extends } {

View File

@ -6,7 +6,7 @@ snippet dir
Order Deny,Allow Order Deny,Allow
Deny from All Deny from All
</Directory> </Directory>
# <FilesMatch> # <FilesMatch>
snippet filesmatch snippet filesmatch
<FilesMatch "${1:regex}"> <FilesMatch "${1:regex}">
${2} ${2}

View File

@ -14,7 +14,7 @@ snippet mainn
return 0; return 0;
} }
## ##
## Preprocessor ## Preprocessor
# #include <...> # #include <...>
snippet inc snippet inc
#include <${1:stdio}.h>${2} #include <${1:stdio}.h>${2}
@ -230,5 +230,5 @@ snippet gpl
* *
* Copyright (C) ${1:Author}, `strftime("%Y")` * Copyright (C) ${1:Author}, `strftime("%Y")`
*/ */
${2} ${2}

View File

@ -141,7 +141,7 @@ snippet svn
${12:#}svn_username ${13} # (Subversion only) Username for Subversion operations ${12:#}svn_username ${13} # (Subversion only) Username for Subversion operations
${14:#}svn_password ${15} # (Subversion only) Password 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 ${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) ${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 ${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 ${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 ${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 ${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. ${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) ${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 ${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 ${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 ${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 ${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 ${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) ${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 ${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 ${64:#}${65::rollback} # Rollback the application to the previous release

View File

@ -43,7 +43,7 @@ snippet if
(if ${1:test-expr} (if ${1:test-expr}
${2:then-expr} ${2:then-expr}
${3:else-expr}) ${3:else-expr})
snippet if-let snippet if-let
(if-let [${1:result} ${2:test-expr}] (if-let [${1:result} ${2:test-expr}]
(${3:then-expr} $1) (${3:then-expr} $1)
(${4:else-expr})) (${4:else-expr}))

View File

@ -39,7 +39,7 @@ snippet link
TARGET_LINK_LIBRARIES(${1:bin} TARGET_LINK_LIBRARIES(${1:bin}
${2:somelib} ${2:somelib}
) )
snippet bin snippet bin
ADD_EXECUTABLE(${1:bin}) ADD_EXECUTABLE(${1:bin})
@ -52,7 +52,7 @@ snippet dep
) )
snippet props snippet props
SET_TARGET_PROPERTIES(${1:target} SET_TARGET_PROPERTIES(${1:target}
${2:PROPERTIES} ${3:COMPILE_FLAGS} ${2:PROPERTIES} ${3:COMPILE_FLAGS}
${4:"-O3 -Wall -pedantic"} ${4:"-O3 -Wall -pedantic"}
) )

View File

@ -64,11 +64,11 @@ snippet fr
# mutable # mutable
snippet mu snippet mu
mutable mutable
## ##
## Class ## Class
# class # class
snippet cl snippet cl
class ${1:`Filename('$1', 'name')`} class ${1:`Filename('$1', 'name')`}
{ {
public: public:
$1(${2}); $1(${2});
@ -97,7 +97,7 @@ snippet cin
std::cin >> ${1};${2} std::cin >> ${1};${2}
## ##
## Iteration ## Iteration
# for i # for i
snippet fori snippet fori
for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) { for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) {
${4} ${4}

View File

@ -1,12 +1,12 @@
# cs.snippets # cs.snippets
# =========== # ===========
# #
# Standard C-Sharp snippets for snipmate. # Standard C-Sharp snippets for snipmate.
# #
# Largely ported over from Visual Studio 2010 snippets plus # Largely ported over from Visual Studio 2010 snippets plus
# a few snippets from Resharper plus a few widely known snippets. # 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 # follow suffix conventions. The order of suffixes to a snippet
# is fixed. # is fixed.
# #
@ -55,13 +55,13 @@
# * Events # * Events
# #
# Feedback is welcome! # Feedback is welcome!
# #
# entry point # entry point
snippet sim snippet sim
public static int Main(string[] args) { public static int Main(string[] args) {
${1} ${1}
return 0; return 0;
} }
snippet simc snippet simc
public class Application { public class Application {
public static int Main(string[] args) { public static int Main(string[] args) {
@ -73,13 +73,13 @@ snippet simc
snippet if snippet if
if (${1}) { if (${1}) {
${2} ${2}
} }
snippet el snippet el
else { else {
${1} ${1}
} }
snippet ifs snippet ifs
if (${1}) if (${1})
${2} ${2}
# ternary conditional # ternary conditional
snippet t snippet t

View File

@ -73,16 +73,16 @@ snippet model
class ${1:ModelName}(models.Model): class ${1:ModelName}(models.Model):
"""${2:docstring}""" """${2:docstring}"""
${3} ${3}
class Meta: class Meta:
${4} ${4}
def __unicode__(self): def __unicode__(self):
${5} ${5}
def save(self, force_insert=False, force_update=False): def save(self, force_insert=False, force_update=False):
${6} ${6}
@models.permalink @models.permalink
def get_absolute_url(self): def get_absolute_url(self):
return ('${7:view_or_url_name}' ${8}) return ('${7:view_or_url_name}' ${8})
@ -90,9 +90,9 @@ snippet model
snippet modeladmin snippet modeladmin
class ${1:ModelName}Admin(admin.ModelAdmin): class ${1:ModelName}Admin(admin.ModelAdmin):
${2} ${2}
admin.site.register($1, $1Admin) admin.site.register($1, $1Admin)
snippet tabularinline snippet tabularinline
class ${1:ModelName}Inline(admin.TabularInline): class ${1:ModelName}Inline(admin.TabularInline):
model = $1 model = $1

View File

@ -1,12 +1,12 @@
# module and export all # module and export all
snippet mod snippet mod
-module(${1:`Filename('', 'my')`}). -module(${1:`Filename('', 'my')`}).
-compile([export_all]). -compile([export_all]).
start() -> start() ->
${2} ${2}
stop() -> stop() ->
ok. ok.
# define directive # define directive
@ -81,7 +81,7 @@ snippet application
end. end.
stop(_State) -> stop(_State) ->
ok. ok.
# OTP supervisor # OTP supervisor
snippet supervisor snippet supervisor
-module(${1:`Filename('', 'my')`}). -module(${1:`Filename('', 'my')`}).

View File

@ -1,15 +1,15 @@
snippet #! snippet #!
#!/usr/bin/env falcon #!/usr/bin/env falcon
# Import # Import
snippet imp snippet imp
import ${1:module} import ${1:module}
# Function # Function
snippet fun snippet fun
function ${2:function_name}(${3}) function ${2:function_name}(${3})
${4} ${4}
end end
# Class # Class
snippet class snippet class
@ -17,35 +17,35 @@ snippet class
${3:/* members/methods */} ${3:/* members/methods */}
end end
# If # If
snippet if snippet if
if ${1:condition} if ${1:condition}
${2} ${2}
end end
# If else # If else
snippet ife snippet ife
if ${1:condition} if ${1:condition}
${2} ${2}
else else
${1} ${1}
end end
# If else if # If else if
snippet elif snippet elif
elif ${1:condition} elif ${1:condition}
${2} ${2}
# Switch case # Switch case
snippet switch snippet switch
switch ${1:expression} switch ${1:expression}
case ${2:item} case ${2:item}
case ${3:item} case ${3:item}
default default
end end
# Select # Select
snippet select snippet select
select ${1:variable} select ${1:variable}
case ${2:TypeSpec} case ${2:TypeSpec}
case ${3:TypeSpec} case ${3:TypeSpec}
@ -65,7 +65,7 @@ snippet forto
end end
# While Loop # While Loop
snippet while snippet while
while ${1:conidition} while ${1:conidition}
${2} ${2}
end end

View File

@ -4,7 +4,7 @@ snippet ap
# bool # bool
snippet bl snippet bl
bool bool
# byte # byte
snippet bt snippet bt
byte byte
# break # break
@ -29,7 +29,7 @@ snippet co
# continue # continue
snippet cn snippet cn
continue continue
# defer # defer
snippet df snippet df
defer ${1:func}() defer ${1:func}()
# defer recover # defer recover
@ -57,20 +57,20 @@ snippet gpl
* *
* Copyright (C) ${1:Author}, `strftime("%Y")` * Copyright (C) ${1:Author}, `strftime("%Y")`
*/ */
${2} ${2}
# int # int
snippet i snippet i
int int
# import # import
snippet im snippet im
import ( import (
"${1:package}" "${1:package}"
)${2} )${2}
# interface # interface
snippet in snippet in
interface{} interface{}
# full interface snippet # full interface snippet
snippet inf snippet inf
interface ${1:name} { interface ${1:name} {
${2:/* methods */} ${2:/* methods */}
@ -126,13 +126,13 @@ snippet fr
${4} ${4}
} }
${5} ${5}
# function simple # function simple
snippet fun snippet fun
func ${1:funcName}(${2}) ${3:error} { func ${1:funcName}(${2}) ${3:error} {
${4} ${4}
} }
${5} ${5}
# function on receiver # function on receiver
snippet fum snippet fum
func (self ${1:type}) ${2:funcName}(${3}) ${4:error} { func (self ${1:type}) ${2:funcName}(${3}) ${4:error} {
${5} ${5}
@ -147,7 +147,7 @@ snippet lp
# make # make
snippet mk snippet mk
make(${1:[]string}, ${2:0}) make(${1:[]string}, ${2:0})
# map # map
snippet mp snippet mp
map[${1:string}]${2:int} map[${1:string}]${2:int}
# main() # main()
@ -159,19 +159,19 @@ snippet main
# new # new
snippet nw snippet nw
new(${1:type}) new(${1:type})
# panic # panic
snippet pn snippet pn
panic("${1:msg}") panic("${1:msg}")
# print # print
snippet pr snippet pr
fmt.Printf("%${1:s}\n", ${2:var})${3} fmt.Printf("%${1:s}\n", ${2:var})${3}
# range # range
snippet rn snippet rn
range ${1} range ${1}
# return # return
snippet rt snippet rt
return ${1} return ${1}
# result # result
snippet rs snippet rs
result result
# select # select
@ -193,7 +193,7 @@ snippet st
${2:/* data */} ${2:/* data */}
} }
${3} ${3}
# switch # switch
snippet sw snippet sw
switch ${1:var} { switch ${1:var} {
case ${2:value1}: case ${2:value1}:
@ -205,7 +205,7 @@ snippet sw
} }
snippet sp snippet sp
fmt.Sprintf("%${1:s}", ${2:var})${3} fmt.Sprintf("%${1:s}", ${2:var})${3}
# true # true
snippet t snippet t
true true
# variable declaration # variable declaration

View File

@ -48,7 +48,7 @@ snippet ap
${1:map} ${2:fn} ${3:list} ${1:map} ${2:fn} ${3:list}
snippet do snippet do
do do
snippet λ snippet λ
\${1:x} -> ${2} \${1:x} -> ${2}
snippet \ snippet \

View File

@ -28,7 +28,7 @@ snippet if
${2} ${2}
{% end %} {% end %}
snippet elif snippet elif
{% elif ${1:condition} %} {% elif ${1:condition} %}
snippet else snippet else
{% else %} {% else %}
snippet import snippet import

View File

@ -47,7 +47,7 @@ snippet tc
## ##
## Class Enhancements ## Class Enhancements
snippet ext snippet ext
extends extends
snippet imp snippet imp
implements implements
## ##

View File

@ -140,7 +140,7 @@ snippet sing
$1 = function $1($2) { $1 = function $1($2) {
return instance; return instance;
}; };
// carry over the prototype properties // carry over the prototype properties
$1.prototype = this; $1.prototype = this;
@ -154,7 +154,7 @@ snippet sing
return instance; return instance;
} }
# Crockford's object function # Crockford's object function
snippet obj snippet obj
function object(o) { function object(o) {
function F() {} function F() {}
@ -164,7 +164,7 @@ snippet obj
# Define multiple properties # Define multiple properties
snippet props snippet props
var ${1:my_object} = Object.defineProperties( var ${1:my_object} = Object.defineProperties(
${2:new Object()}, ${2:new Object()},
{ {
${3:property} : { ${3:property} : {
get : function $1_$3_getter() { get : function $1_$3_getter() {
@ -182,9 +182,9 @@ snippet props
); );
# Define single property # Define single property
snippet prop snippet prop
Object.defineProperty( Object.defineProperty(
${1:object}, ${1:object},
"${2:property}", "${2:property}",
{ {
get : function $1_$2_getter() { get : function $1_$2_getter() {
// getter code // getter code

View File

@ -24,11 +24,11 @@ snippet ![:*
snippet === snippet ===
`repeat('=', strlen(getline(line(".") - 1)))` `repeat('=', strlen(getline(line(".") - 1)))`
${1} ${1}
snippet --- snippet ---
`repeat('-', strlen(getline(line(".") - 1)))` `repeat('-', strlen(getline(line(".") - 1)))`
${1} ${1}
snippet blockquote snippet blockquote

View File

@ -55,4 +55,4 @@ snippet log
snippet dec snippet dec
DECIMAL DECIMAL
snippet sep snippet sep
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */

View File

@ -1,6 +1,6 @@
# Snippets for use with VIM and http://www.vim.org/scripts/script.php?script_id=2540 # 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 # see it in action @ http://www.devco.net/archives/2009/09/22/vim_and_puppet.php
# Language Constructs # Language Constructs
@ -25,7 +25,7 @@ snippet ife
snippet if snippet if
if $${1:variable} { if $${1:variable} {
${2} ${2}
} }
snippet else snippet else
else { else {
${1} ${1}
@ -34,7 +34,7 @@ snippet ?
? { ? {
'${1}' => ${2} '${1}' => ${2}
} }
# #
# blocks etc and general syntax sugar # blocks etc and general syntax sugar
snippet [ snippet [
[ ${1} ]${2} [ ${1} ]${2}
@ -54,7 +54,7 @@ snippet defined
defined(${1:Resource}["${2:name}"])${3} defined(${1:Resource}["${2:name}"])${3}
snippet emerg snippet emerg
emerg("${1:message}")${2} emerg("${1:message}")${2}
snippet extlookup Simple extlookup snippet extlookup Simple extlookup
extlookup("${1:variable}")${2} extlookup("${1:variable}")${2}
snippet extlookup Extlookup with defaults snippet extlookup Extlookup with defaults
extlookup("${1:variable}", "${2:default}")${3} extlookup("${1:variable}", "${2:default}")${3}

View File

@ -140,7 +140,7 @@ snippet test
# test case # test case
snippet testcase snippet testcase
class ${1:ExampleCase}(unittest.TestCase): class ${1:ExampleCase}(unittest.TestCase):
def test_${2:description}(self): def test_${2:description}(self):
${3} ${3}
snippet fut snippet fut
@ -151,7 +151,7 @@ snippet getopt
# Short option syntax: "hv:" # Short option syntax: "hv:"
# Long option syntax: "help" or "verbose=" # Long option syntax: "help" or "verbose="
opts, args = getopt.getopt(sys.argv[1:], "${1:short_options}", [${2:long_options}]) opts, args = getopt.getopt(sys.argv[1:], "${1:short_options}", [${2:long_options}])
except getopt.GetoptError, err: except getopt.GetoptError, err:
# Print debug info # Print debug info
print str(err) print str(err)

View File

@ -117,5 +117,5 @@ snippet cor
cor.test(${1:x}, ${2:y}) cor.test(${1:x}, ${2:y})
snippet fte snippet fte
var.test(${1:x}, ${2:y}) var.test(${1:x}, ${2:y})
snippet kvt snippet kvt
kv.test(${1:x}, ${2:y}) kv.test(${1:x}, ${2:y})

View File

@ -30,7 +30,7 @@ snippet cont:
${1:content} ${1:content}
snippet code: snippet code:
.. code:: ${1:type} .. code:: ${1:type}
${2:write some code} ${2:write some code}
snippet tip: snippet tip:
.. tip:: .. tip::
@ -59,11 +59,11 @@ snippet cau:
#Spinx only #Spinx only
snippet sid: snippet sid:
.. sidebar:: ${1:Title} .. sidebar:: ${1:Title}
${2} ${2}
# CJK optimize, CJK has no space between charaters # CJK optimize, CJK has no space between charaters
snippet *c snippet *c
\ *${1:Emphasis}*\ ${2} \ *${1:Emphasis}*\ ${2}
snippet **c snippet **c
\ **${1:Strong emphasis}**\ ${2} \ **${1:Strong emphasis}**\ ${2}

View File

@ -1,7 +1,7 @@
# Shebang. Executing bash via /usr/bin/env makes scripts more portable. # Shebang. Executing bash via /usr/bin/env makes scripts more portable.
snippet #! snippet #!
#!/usr/bin/env bash #!/usr/bin/env bash
snippet if snippet if
if [[ ${1:condition} ]]; then if [[ ${1:condition} ]]; then
${2:#statements} ${2:#statements}
@ -30,9 +30,9 @@ snippet case
${2:pattern}) ${2:pattern})
${3};; ${3};;
esac esac
snippet go snippet go
while getopts '${1:o}' ${2:opts} while getopts '${1:o}' ${2:opts}
do do
case $$2 in case $$2 in
${3:o0}) ${3:o0})
${4:#staments};; ${4:#staments};;
@ -53,9 +53,9 @@ snippet getopt
{ {
cat <<- EOT cat <<- EOT
Usage : $${0:0} [options] [--] Usage : $${0:0} [options] [--]
Options: Options:
-h|help Display this message -h|help Display this message
-v|version Display script version -v|version Display script version

View File

@ -1,7 +1,7 @@
# #!/usr/bin/env tclsh # #!/usr/bin/env tclsh
snippet #! snippet #!
#!/usr/bin/env tclsh #!/usr/bin/env tclsh
# Process # Process
snippet pro snippet pro
proc ${1:function_name} {${2:args}} { proc ${1:function_name} {${2:args}} {

View File

@ -27,4 +27,4 @@ snippet fn
[${1:ref number}] ${3} [${1:ref number}] ${3}
fn$1. ${2:footnote} fn$1. ${2:footnote}

View File

@ -50,7 +50,7 @@ snippet import
snippet include snippet include
<xsl:include href="${1:stylesheet}" />${2} <xsl:include href="${1:stylesheet}" />${2}
snippet otherwise snippet otherwise
<xsl:otherwise>${1} <xsl:otherwise>${1}
</xsl:otherwise> </xsl:otherwise>
@ -64,7 +64,7 @@ snippet stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">${1} xmlns:xsl="http://www.w3.org/1999/XSL/Transform">${1}
</xsl:stylesheet> </xsl:stylesheet>
snippet template snippet template
<xsl:template match="${1:*}">${3} <xsl:template match="${1:*}">${3}
</xsl:template> </xsl:template>
@ -91,7 +91,7 @@ snippet when
snippet with-param snippet with-param
<xsl:with-param name="${1:name}">${2}</xsl:with-param> <xsl:with-param name="${1:name}">${2}</xsl:with-param>
snippet with-param select snippet with-param select
<xsl:with-param name="${1:name}" select="${2:*}" /> <xsl:with-param name="${1:name}" select="${2:*}" />

View File

@ -1,59 +1,59 @@
#--------------------Yii CHtml--------------------------------- #--------------------Yii CHtml---------------------------------
#Yii CHtml::radioButton #Yii CHtml::radioButton
snippet yhrb 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 #Yii CHtml::asset
snippet yhass snippet yhass
echo CHtml::asset('${1:path}'); echo CHtml::asset('${1:path}');
#Yii CHtml::activeLabelEx #Yii CHtml::activeLabelEx
snippet yhale 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 #Yii CHtml::encodeArray
snippet yheca snippet yheca
echo CHtml::encodeArray(array(${1})); echo CHtml::encodeArray(array(${1}));
#Yii CHtml::normalizeUrl #Yii CHtml::normalizeUrl
snippet yhnurl snippet yhnurl
echo CHtml::normalizeUrl(array('${1}')); echo CHtml::normalizeUrl(array('${1}'));
#Yii CHtml::resetButton #Yii CHtml::resetButton
snippet yhsb 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 #Yii CHtml::linkButton
snippet yhlinkb 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 #Yii CHtml::activeTextArea
snippet yhata 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 #Yii CHtml::ajaxButton
snippet yhajb 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 #Yii CHtml::activeId
snippet yhai snippet yhai
echo CHtml::activeId(${1:model}, '${2:attribute}'); echo CHtml::activeId(${1:model}, '${2:attribute}');
#Yii CHtml::activeCheckBox #Yii CHtml::activeCheckBox
snippet yhacb 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 #Yii CHtml::activeHiddenField
snippet yhahf 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 #Yii CHtml::encode
snippet yhec snippet yhec
echo CHtml::encode(${1:text}); echo CHtml::encode(${1:text});
#Yii CHtml::metaTag #Yii CHtml::metaTag
snippet yhmtag 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 #Yii CHtml::dropDownList
snippet yhddl snippet yhddl
@ -61,167 +61,167 @@ snippet yhddl
#Yii CHtml::listBox #Yii CHtml::listBox
snippet yhlb 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 #Yii CHtml::script
snippet yhjs snippet yhjs
echo CHtml::script('${1:test}'); echo CHtml::script('${1:test}');
#Yii CHtml::ajax #Yii CHtml::ajax
snippet yhaj snippet yhaj
echo CHtml::ajax(array(${1})); echo CHtml::ajax(array(${1}));
#Yii CHtml::textField #Yii CHtml::textField
snippet yhtf 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 #Yii CHtml::activePasswordField
snippet yhapf 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 #Yii CHtml::listData
snippet yhld 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 #Yii CHtml::mailto
snippet yhmt 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 #Yii CHtml::image
snippet yhimg 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 #Yii CHtml::activeListBox
snippet yhalb 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 #Yii CHtml::activeFileField
snippet yhaff 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 #Yii CHtml::closeTag
snippet yhct snippet yhct
echo CHtml::closeTag('${1:tag}'); echo CHtml::closeTag('${1:tag}');
#Yii CHtml::activeInputField #Yii CHtml::activeInputField
snippet yhaif 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 #Yii CHtml::scriptFile
snippet yhjsf snippet yhjsf
echo CHtml::scriptFile('${1:url}'); echo CHtml::scriptFile('${1:url}');
#Yii CHtml::radioButtonList #Yii CHtml::radioButtonList
snippet yhrbl 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 #Yii CHtml::cssFile
snippet yhcssf snippet yhcssf
echo CHtml::cssFile('${1:url}','${2:media}'); echo CHtml::cssFile('${1:url}','${2:media}');
#Yii CHtml::error #Yii CHtml::error
snippet yherr snippet yherr
echo CHtml::error(${1:model}, '${2:attribute}'); echo CHtml::error(${1:model}, '${2:attribute}');
#Yii CHtml::passwordField #Yii CHtml::passwordField
snippet yhpf 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 #Yii CHtml::hiddenField
snippet yhhf 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 #Yii CHtml::cdata
snippet yhc snippet yhc
echo CHtml::cdata(${1:text}); echo CHtml::cdata(${1:text});
#Yii CHtml::link #Yii CHtml::link
snippet yhlink 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 #Yii CHtml::errorSummary
snippet yherrs snippet yherrs
echo CHtml::errorSummary(${1:model},'${2:headerHtml}','${3:footerHtml}'); echo CHtml::errorSummary(${1:model},'${2:headerHtml}','${3:footerHtml}');
#Yii CHtml::tag #Yii CHtml::tag
snippet yht 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 #Yii CHtml::ajaxLink
snippet yhajl 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 #Yii CHtml::label
snippet yhlabel 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 #Yii CHtml::activeName
snippet yhan snippet yhan
echo CHtml::activeName(${1:model}, '${2:attribute}'); echo CHtml::activeName(${1:model}, '${2:attribute}');
#Yii CHtml::statefulForm #Yii CHtml::statefulForm
snippet yhsform 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 #Yii CHtml::fileField
snippet yhff 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 #Yii CHtml::activeTextField
snippet yhatf 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 #Yii CHtml::css
snippet yhcss snippet yhcss
echo CHtml::css('${1:test}','${2:media}'); echo CHtml::css('${1:test}','${2:media}');
#Yii CHtml::imageButton #Yii CHtml::imageButton
snippet yhimgb 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 #Yii CHtml::ajaxSubmitButton
snippet yhajsb 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 #Yii CHtml::button
snippet yhb 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 #Yii CHtml::listOptions
snippet yhlo 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 #Yii CHtml::activeCheckBoxList
snippet yhacbl 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 #Yii CHtml::openTag
snippet yhot 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 #Yii CHtml::checkBox
snippet yhcb 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 #Yii CHtml::textArea
snippet yhta 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 #Yii CHtml::linkTag
snippet yhlinkt 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 #Yii CHtml::resetButton
snippet yhrsb 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 #Yii CHtml::activeRadioButtonList
snippet yharbl 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 #Yii CHtml::checkBoxList
snippet yhcbl 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 #Yii CHtml::form
snippet yhform snippet yhform
@ -231,18 +231,18 @@ snippet yhform
snippet yhbeform snippet yhbeform
echo CHtml::beginForm(array('${1}'), '${2:post}',array('${3:optionName}'=>${4:optionValue})); echo CHtml::beginForm(array('${1}'), '${2:post}',array('${3:optionName}'=>${4:optionValue}));
${5} ${5}
echo CHtml::endForm(); echo CHtml::endForm();
#Yii CHtml::activeDropDownList #Yii CHtml::activeDropDownList
snippet yhaddl 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 #Yii CHtml::activeRadioButton
snippet yharb 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 #Yii CHtml::activeLabel
snippet yhal 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}));

View File

@ -1,58 +1,58 @@
#Yii session offset #Yii session offset
snippet yse snippet yse
Yii::app()->session['${1}']; Yii::app()->session['${1}'];
#Yii renderDynamic #Yii renderDynamic
snippet yrd snippet yrd
$this->renderDynamic('${1:callback}'); $this->renderDynamic('${1:callback}');
#Yii set cache #Yii set cache
snippet ycas 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 #Yii Add cache
snippet ycad 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 #Yii register CSS file
snippet yregcf snippet yregcf
Yii::app()->clientScript->registerCssFile('${1:file}'); Yii::app()->clientScript->registerCssFile('${1:file}');
#Yii requestType #Yii requestType
snippet yreqtype snippet yreqtype
Yii::app()->request->requestType Yii::app()->request->requestType
#Yii isAjaxRequest #Yii isAjaxRequest
snippet yisajax snippet yisajax
Yii::app()->request->isAjaxRequest Yii::app()->request->isAjaxRequest
#Yii translate #Yii translate
snippet yt snippet yt
Yii::t('${1:category}', '${2:message}',array(${3})); Yii::t('${1:category}', '${2:message}',array(${3}));
#Yii register CSS #Yii register CSS
snippet yregc snippet yregc
Yii::app()->clientScript->registerCss('${1:id}', '${2}'); Yii::app()->clientScript->registerCss('${1:id}', '${2}');
#Yii log #Yii log
snippet ylog snippet ylog
Yii::log('${1:msg}', '${2:info}'); Yii::log('${1:msg}', '${2:info}');
#Yii userHostAddress #Yii userHostAddress
snippet yuserip snippet yuserip
YYii::app()->request->userHostAddress YYii::app()->request->userHostAddress
#Yii register script file #Yii register script file
snippet yregsf snippet yregsf
Yii::app()->clientScript->registerScriptFile('${1:scriptUrl}', CClientScript::POS_${2:END}); Yii::app()->clientScript->registerScriptFile('${1:scriptUrl}', CClientScript::POS_${2:END});
#Yii CLinkPager #Yii CLinkPager
snippet ylinkpager snippet ylinkpager
$this->widget('CLinkPager', array('pages'=>$pages,'header'=>'${1}'})) $this->widget('CLinkPager', array('pages'=>$pages,'header'=>'${1}'}))
#Yii CJSON::encode #Yii CJSON::encode
snippet yjec snippet yjec
CJSON::encode(${1:text}); CJSON::encode(${1:text});
#CActiveDataProvider #CActiveDataProvider
snippet yadp snippet yadp
@ -68,23 +68,23 @@ snippet yadp
), ),
)); ));
${6} ${6}
// $dataProvider->getData() will return a list of Post objects // $dataProvider->getData() will return a list of Post objects
#Yii renderDynamic internal #Yii renderDynamic internal
snippet yrdi snippet yrdi
$this->renderDynamic('${1:callback}', array('${2:key}'=>${3:value})); $this->renderDynamic('${1:callback}', array('${2:key}'=>${3:value}));
#Yii register script #Yii register script
snippet yregs 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 #Yii Flush cache
snippet ycaf snippet ycaf
Yii::app()->cache->flush(); Yii::app()->cache->flush();
#Yii Yii::app()->request->cookies #Yii Yii::app()->request->cookies
snippet yco snippet yco
Yii::app()->request->cookies['${1}'] Yii::app()->request->cookies['${1}']
#Yii user-> #Yii user->
snippet yuser snippet yuser
@ -92,54 +92,54 @@ snippet yuser
#Yii refresh #Yii refresh
snippet yrf snippet yrf
$this->refresh(); $this->refresh();
#Yii import #Yii import
snippet yimp snippet yimp
Yii::import('${1}'); Yii::import('${1}');
#Yii trace #Yii trace
snippet ytrace snippet ytrace
Yii::trace('${1:msg}'); Yii::trace('${1:msg}');
#Yii params #Yii params
snippet ypar snippet ypar
Yii::app()->params['${1}'] Yii::app()->params['${1}']
#Yii isPostRequest #Yii isPostRequest
snippet yispost snippet yispost
Yii::app()->request->isPostRequest Yii::app()->request->isPostRequest
#Yii IF isAjaxRequest #Yii IF isAjaxRequest
snippet yifisajax snippet yifisajax
if(Yii::app()->request->isAjaxRequest == TRUE) if(Yii::app()->request->isAjaxRequest == TRUE)
{ {
${1} ${1}
} }
#Yii Yii::app()->cache->delete #Yii Yii::app()->cache->delete
snippet ydelcache snippet ydelcache
Yii::app()->cache->delete('${1:key}'); Yii::app()->cache->delete('${1:key}');
#Yii render view #Yii render view
snippet yr snippet yr
$this->render('${1:view}',array('${2:key}'=>${3:value})); $this->render('${1:view}',array('${2:key}'=>${3:value}));
#Yii redirect #Yii redirect
snippet yre snippet yre
$this->redirect(array('${1:controller}/${2:action}')); $this->redirect(array('${1:controller}/${2:action}'));
#Yii Get cache #Yii Get cache
snippet ycag snippet ycag
Yii::app()->cache->get('${1:key}'); Yii::app()->cache->get('${1:key}');
#Yii render text #Yii render text
snippet yrt snippet yrt
$this->renderText('${1}'); $this->renderText('${1}');
#Yii render partial #Yii render partial
snippet yrp snippet yrp
$this->renderPartial('${1:view}',array('${2:key}'=>${3:value})); $this->renderPartial('${1:view}',array('${2:key}'=>${3:value}));
#----------------Yii Model----------------------------- #----------------Yii Model-----------------------------
#Yii Model count #Yii Model count
@ -152,7 +152,7 @@ snippet ycountbs
#Yii Model updateAll #Yii Model updateAll
snippet yupdatea 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 #Yii Model updateByPk
snippet yupdatebp snippet yupdatebp
@ -164,35 +164,35 @@ snippet ydela
#Yii Model deleteByPk #Yii Model deleteByPk
snippet ydelbp 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 #Yii Model find
snippet yfind 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 #Yii Model findAll
snippet yfinda 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 #Yii Model findByPk
snippet yfindbp 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 #Yii Model findAllByPk
snippet yfindabp 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 #Yii Model findBySql
snippet yfindbs 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 #Yii Model findAllByAttributes
snippet yfindaba 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 #Yii Model exists
snippet yexists 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 #Yii Create model class
snippet ymodel snippet ymodel
@ -245,7 +245,7 @@ snippet ymodel
} }
} }
#------------Yii Controller------------------------------------ #------------Yii Controller------------------------------------
#Yii Create controller class #Yii Create controller class
snippet ycontroller snippet ycontroller