- Refactored snippets files.

This commit is contained in:
Shougo Matsushita 2012-10-30 17:53:14 +09:00
parent a4c2f3d376
commit 19e6bb6253
24 changed files with 462 additions and 480 deletions

View File

@ -1,23 +1,23 @@
snippet if snippet if
abbr if () {} abbr if () {}
if (${1:/* condition */}) { if (${1:#:condition}) {
${0:/* code */} ${0:TARGET}
} }
snippet else snippet else
else { else {
${0} ${0:TARGET}
} }
snippet elseif snippet elseif
else if (${1:/* condition */}) { else if (${1:#:condition}) {
${0} ${0:TARGET}
} }
snippet ifelse snippet ifelse
abbr if () {} else {} abbr if () {} else {}
if (${1:condition}) { if (${1:#:condition}) {
${2} ${2:TARGET}
} else { } else {
${3} ${3}
} }
@ -25,59 +25,59 @@ abbr if () {} else {}
snippet for snippet for
abbr for () {} abbr for () {}
for (${1} = 0; $1 < ${2}; $1++) { for (${1} = 0; $1 < ${2}; $1++) {
${0} ${0:TARGET}
} }
snippet while snippet while
abbr while () {} abbr while () {}
while (${1:/* condition */}) { while (${1:#:condition}) {
${0:/* code */} ${0:TARGET}
} }
snippet do_while snippet do_while
alias do alias do
do { do {
${0:/* code */} ${0:TARGET:code}
} while (${1:/* condition */}); } while (${1:#:condition});
snippet switch snippet switch
abbr switch () {} abbr switch () {}
switch (${1:var}) { switch (${1:#:var}) {
case ${2:val}: case ${2:#:val}:
${0} ${0:TARGET}
break; break;
} }
snippet function snippet function
alias func alias func
abbr func() {} abbr func() {}
${1:void} ${2:func_name}(${3}) { ${1:void} ${2:#:func_name}(${3:#:args}) {
${0} ${0:TARGET}
} }
snippet struct snippet struct
abbr struct {} abbr struct {}
struct ${1:name} { struct ${1:#:name} {
${0:/* data */} ${0:TARGET:data}
}; };
# Typedef struct # Typedef struct
snippet struct_typedef snippet struct_typedef
typedef struct ${1:name} { typedef struct ${1:#:name} {
${0:/* data */} ${0:TARGET:data}
}; };
snippet enum snippet enum
abbr enum {} abbr enum {}
enum ${1:name} { enum ${1:#:name} {
${0} ${0:TARGET}
}; };
# hard-tab is necessary; C indent doesn't support this. # hard-tab is necessary; C indent doesn't support this.
snippet main snippet main
int main(int argc, char const* argv[]) int main(int argc, char const* argv[])
{ {
${0} ${0:TARGET}
return 0; return 0;
} }
@ -88,13 +88,13 @@ alias #inc, #include
# #include "..." # #include "..."
snippet inc2 snippet inc2
alias #inc2, #include2 alias #inc2, #include2
#include "${1:}.h"${0} #include "${1}.h"${0}
snippet ifndef snippet ifndef
alias #ifndef alias #ifndef
abbr #ifndef ... #define ... #endif abbr #ifndef ... #define ... #endif
#ifndef $1 #ifndef $1
#define ${1:SYMBOL} #define ${1:#:SYMBOL}
#endif${0} #endif${0}
snippet def snippet def
@ -107,16 +107,16 @@ abbr include-guard
#ifndef ${1:SYMBOL} #ifndef ${1:SYMBOL}
#define $1 #define $1
${0} ${0:TARGET}
#endif /* end of include guard */ #endif /* end of include guard */
# Tertiary conditional # Tertiary conditional
snippet conditional snippet conditional
(${1:/* condition */}) ? ${2:a} : ${3:b} (${1:#:condition}) ? ${2:#:a} : ${3:#:b}
# Typedef # Typedef
snippet typedef snippet typedef
typedef ${1:base_type} ${2:custom_type}; typedef ${1:#:base_type} ${2:#:custom_type};
snippet printf snippet printf
abbr printf("...\n", ...); abbr printf("...\n", ...);
@ -128,12 +128,12 @@ abbr fprintf(..., "...\n", ...);
snippet comment snippet comment
alias /* alias /*
/* ${1:comment} */ /* ${1:#:comment} */
${0} ${0}
snippet sizeof snippet sizeof
alias size alias size
sizeof(${0}) sizeof(${0:TARGET})
snippet helloworld snippet helloworld
#include <stdio.h> #include <stdio.h>
@ -142,3 +142,4 @@ snippet helloworld
puts("hello, world!"); puts("hello, world!");
return 0; return 0;
} }

View File

@ -1,72 +1,72 @@
snippet req snippet req
${1:object} = require('$1') ${1:#:object} = require('$1')
snippet log snippet log
console.log ${0} console.log ${0}
snippet unl snippet unl
${1:action} unless ${2:condition} ${1:#:action} unless ${2:#:condition}
snippet try snippet try
try try
${1} ${1:TARGET}
catch ${2:error} catch ${2:#:error}
${3} ${3}
snippet if snippet if
if ${1:condition} if ${1:#:condition}
${0:# body...} ${0:TARGET}
snippet elif snippet elif
else if ${1:condition} else if ${1:#:condition}
${0:# body...} ${0:TARGET}
snippet ifte snippet ifte
if ${1:condition} then ${2:value} else ${3:other} if ${1:#:condition} then ${2:#:value} else ${3:#:other}
snippet ife snippet ife
if ${1:condition} if ${1:#:condition}
${2:# body...} ${2:TARGET}
else else
${3:# body...} ${3:#:body...}
snippet swi snippet swi
switch ${1:object} switch ${1:#:object}
when ${2:value} when ${2:#:value}
${0:# body...} ${0:TARGET}
snippet ^j snippet ^j
\`${1:javascript}\` \`${1:javascript}\`
snippet forr snippet forr
for ${1:name} in [${2:start}..${3:finish}]${4: by ${5:step\}} for ${1:#:name} in [${2:#:start}..${3:#:finish}]${4: by ${5:#:step\}}
${0:# body...} ${0:TARGET}
snippet forrex snippet forrex
for ${1:name} in [${2:start}...${3:finish}]${4: by ${t:step\}} for ${1:#:name} in [${2:#:start}...${3:#:finish}]${4: by ${5:#:step\}}
${0:# body...} ${0:TARGET}
snippet foro snippet foro
for ${1:key}, ${2:value} of ${3:object} for ${1:#:key}, ${2:#:value} of ${3:#:object}
${0:# body...} ${0:TARGET}
snippet fora snippet fora
for ${1:name} in ${2:array} for ${1:#:name} in ${2:#:array}
${0:# body...} ${0:TARGET}
snippet fun snippet fun
${1:name} = (${2:args}) -> ${1:#:name} = (${2:#:args}) ->
${0:# body...} ${0:TARGET}
snippet bfun snippet bfun
(${1:args}) => (${1:#:args}) =>
${0:# body...} ${0:TARGET}
snippet cla snippet cla
abbr cla abbr cla
options head options head
class ${1:ClassName}${2: extends ${3:Ancestor\}} class ${1:#:ClassName}${2: extends ${3:#:Ancestor\}}
constructor: (${4:args}) -> constructor: (${4:#:args}) ->
${5:# body...} ${5:TARGET}

View File

@ -6,34 +6,34 @@ abbr template <T>
snippet class snippet class
abbr class {} abbr class {}
class ${1:name} { class ${1:#:name} {
${2} ${2}
}; };
snippet try snippet try
abbr try catch abbr try catch
try { try {
${1} ${1:TARGET}
} catch (${2:exception}) { } catch (${2:e:xception}) {
${3} ${3}
} }
# range based for ( C++11 feature ) # range based for ( C++11 feature )
snippet for_CPP11 snippet for_CPP11
abbr for (:) {} abbr for (:) {}
for (${1:var} : ${2:container}) { for (${1:#:var} : ${2:#:container}) {
${0} ${0:TARGET}
} }
# lambda expression ( C++11 feature ) # lambda expression ( C++11 feature )
snippet lambda snippet lambda
abbr [](){} abbr [](){}
[${1}](${2})${3}{ ${4} } [${1}](${2})${3}{ ${4:TARGET} }
# scoped enumeration ( C++11 feature ) # scoped enumeration ( C++11 feature )
snippet enum_scoped snippet enum_scoped
abbr enum struct {} abbr enum struct {}
enum struct { ${1} } enum struct { ${1:TARGET} }
# static assert ( C++11 feature ) # static assert ( C++11 feature )
snippet static_assert snippet static_assert
@ -44,8 +44,8 @@ delete namespace
snippet namespace snippet namespace
abbr namespace {} abbr namespace {}
options head options head
namespace ${1:name} namespace ${1:#:name}
${0} ${0:TARGET}
} // namespace $1 } // namespace $1
snippet static_cast snippet static_cast
@ -64,8 +64,8 @@ snippet dynamic_cast
abbr dynamic_cast<>() abbr dynamic_cast<>()
dynamic_cast<${1}>(${2})${0} dynamic_cast<${1}>(${2})${0}
snippet helloworld snippet helloworld
abbr #include<iostream>\nint main... abbr #include<iostream> int main...
#include <iostream> #include <iostream>
int main(int argc, char const* argv[]) int main(int argc, char const* argv[])
{ {
@ -73,3 +73,4 @@ abbr #include<iostream>\nint main...
cout << "hello, world!" << endl; cout << "hello, world!" << endl;
return 0; return 0;
} }

View File

@ -1,6 +1,7 @@
snippet background snippet background
alias bg alias bg
background:${1};${2} background:${1};${2}
snippet backattachment snippet backattachment
alias ba alias ba
background-attachment:${1};${2} background-attachment:${1};${2}
@ -21,8 +22,6 @@ snippet backrepeat
alias br alias br
background-repeat:${1};${2} background-repeat:${1};${2}
snippet border snippet border
alias b alias b
border:${1};${2} border:${1};${2}

View File

@ -16,24 +16,25 @@ delete fprintf
snippet foreach snippet foreach
abbr foreach() {} abbr foreach() {}
foreach (${1:var}; ${2:list}) { foreach (${1:#:var}; ${2:#:list}) {
${3} ${3:TARGET}
} }
snippet class snippet class
abbr class {} abbr class {}
class ${1:name} { class ${1:#:name} {
${2} ${2:TARGET}
} }
snippet struct snippet struct
abbr struct {} abbr struct {}
struct ${1:name} { struct ${1:#:name} {
${2} ${2:TARGET}
} }
snippet enum snippet enum
abbr enum {} abbr enum {}
enum ${1:name} { enum ${1:#:name} {
${2} ${2:TARGET}
} }

View File

@ -1,19 +1,20 @@
snippet ruby_print snippet ruby_print
abbr <%= %> abbr <%= %>
<%= ${1:Ruby print code} %>${2} <%= ${1:TARGET} %>${2}
snippet ruby_code snippet ruby_code
abbr <% %> abbr <% %>
<% ${1:Ruby code} %>${2} <% ${1:TARGET} %>${2}
snippet ruby_print_nonl snippet ruby_print_nonl
abbr <%= -%> abbr <%= -%>
<%= ${1:Ruby print code} -%>${2} <%= ${1:TARGET} -%>${2}
snippet ruby_code_nonl snippet ruby_code_nonl
abbr <% -%> abbr <% -%>
<% ${1:Ruby code} -%>${2} <% ${1:TARGET} -%>${2}
snippet comment snippet comment
abbr <%# %> abbr <%# %>
<%# ${1:Comment} %>${2} <%# ${1:TARGET} %>${2}

View File

@ -20,3 +20,4 @@ snippet main
abbr main = do abbr main = do
main = do main = do
${0} ${0}

View File

@ -17,26 +17,25 @@ snippet ab
abstract abstract
snippet cl snippet cl
class ${1} ${2:extends} ${3:Parent} ${4:implements} ${5:Interface} { class ${1} ${2:extends} ${3:#:Parent} ${4:implements} ${5:#:Interface} {
${0} ${0:TARGET}
} }
snippet in snippet in
interface ${1} ${2:extends} ${3:Parent} { interface ${1} ${2:extends} ${3:#:Parent} {
${0} ${0:TARGET}
} }
snippet m snippet m
${1:void} ${2:method}(${3}) ${4:throws} { ${1:void} ${2:#:method}(${3}) ${4:throws} {
${0} ${0:TARGET}
} }
snippet v snippet v
${1:String} ${2:var}${3}; ${1:#:type} ${2:#:var}${3};
snippet co snippet co
static public final ${1:String} ${2:var} = ${3};${4} static public final ${1:#:type} ${2:#:var} = ${3};${4}
snippet cos snippet cos
static public final String ${1:var} = "${2}";${4} static public final String ${1:var} = "${2}";${4}
@ -45,49 +44,44 @@ snippet re
return return
snippet as snippet as
assert ${1:test} ${2:Failure message};${3} assert ${1:#:test} ${2:#:Failure message};${3}
snippet if snippet if
if (${1}) { if (${1}) {
${2} ${2:TARGET}
} }
snippet elif snippet elif
else if (${1}) { else if (${1}) {
${2} ${2:TARGET}
} }
snippet wh snippet wh
while (${1}) { while (${1}) {
${2} ${2:TARGET}
} }
snippet for snippet for
for (${1}; ${2}; ${3}) { for (${1}; ${2}; ${3}) {
${4} ${4:TARGET}
} }
snippet fore snippet fore
for (${1} : ${2}) { for (${1} : ${2}) {
${3} ${3:TARGET}
} }
snippet sw snippet sw
switch (${1}) { switch (${1}) {
${2} ${2:TARGET}
} }
snippet case snippet case
abbr ce abbr ce
case ${1}: case ${1}:
${2} ${2:TARGET}
${0} ${0}
snippet br snippet br
break; break;
@ -96,11 +90,10 @@ snippet de
${0} ${0}
snippet ca snippet ca
catch (${1:Exception} ${2:e}) { catch (${1:#:Exception} ${2:e}) {
${0} ${0}
} }
snippet th snippet th
throw ${0} throw ${0}
@ -115,21 +108,18 @@ snippet pa
snippet tc snippet tc
public class ${1} extends ${2:TestCase} { public class ${1} extends ${2:TestCase} {
${0} ${0:TARGET}
} }
snippet test snippet test
public void test${1:Name}() throws Exception { public void test${1:#:Name}() throws Exception {
${0} ${0:TARGET}
} }
snippet imt snippet imt
import junit.framework.TestCase; import junit.framework.TestCase;
${0} ${0}
snippet j.u snippet j.u
java.util. java.util.
@ -150,7 +140,6 @@ snippet main
${0} ${0}
} }
snippet pl snippet pl
System.out.println(${1});${0} System.out.println(${1});${0}
@ -160,10 +149,9 @@ snippet p
#javadoc #javadoc
snippet c snippet c
/** /**
* ${0} * ${0:TARGET}
*/ */
snippet a snippet a
@author ${0:$TM_FULLNAME} @author ${0:$TM_FULLNAME}
@ -172,7 +160,7 @@ abbr {
{@code ${0} {@code ${0}
snippet d snippet d
@deprecated ${0:description} @deprecated ${0:#:description}
snippet {docRoot snippet {docRoot
abbr { abbr {
@ -184,46 +172,47 @@ abbr {
snippet {link snippet {link
abbr { abbr {
{@link ${1:target} ${0:label} {@link ${1:#:target} ${0:#:label}
snippet {linkplain snippet {linkplain
abbr { abbr {
{@linkplain ${1:target} ${0:label} {@linkplain ${1:#:target} ${0:#:label}
snippet {literal snippet {literal
abbr { abbr {
{@literal ${0} {@literal ${0}
snippet param snippet param
@param ${1:var} ${0:description} @param ${1:#:var} ${0:#:description}
snippet r snippet r
@return ${0:description} @return ${0:#:description}
snippet s snippet s
@see ${0:reference} @see ${0:#:reference}
snippet se snippet se
@serial ${0:description} @serial ${0:#:description}
snippet sd snippet sd
@serialField ${0:description} @serialField ${0:#:description}
snippet sf snippet sf
@serialField ${1:name} ${2:type} ${0:description} @serialField ${1:#:name} ${2:#:type} ${0:#:description}
snippet si snippet si
@since ${0:version} @since ${0:#:version}
snippet t snippet t
@throws ${1:class} ${0:description} @throws ${1:#:class} ${0:#:description}
snippet {value snippet {value
abbr { abbr {
{@value ${0} {@value ${0}
snippet ver snippet ver
@version ${0:version} @version ${0:#:version}
snippet null snippet null
{@code null} {@code null}

View File

@ -1,59 +1,59 @@
snippet :f snippet :f
options head options head
${1:method_name}: function(${2:attribute}) { ${1:#:method_name}: function(${2:#:attribute}) {
${0} ${0:TARGET}
} }
snippet function snippet function
alias func alias func
options word options word
function ${1:function_name}(${2:argument}) { function ${1:#:function_name}(${2:#:argument}) {
${0:// body...} ${0:TARGET}
} }
snippet proto snippet proto
options head options head
${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) { ${1:#:class_name}.prototype.${2:#:method_name} = function(${3:#:first_argument}) {
${0:// body...} ${0:TARGET}
}; };
snippet f snippet f
options word options word
function(${1}) { ${0:$TM_SELECTED_TEXT} }; function(${1}) { ${0:TARGET} };
snippet if snippet if
options head options head
if (${1:true}) { if (${1:true}) {
${0:$TM_SELECTED_TEXT} ${0:TARGET}
} }
snippet ife snippet ife
options head options head
if (${1:true}) { if (${1:#:condition}) {
${0:$TM_SELECTED_TEXT} ${0:TARGET}
} else { } else {
} }
snippet for snippet for
options head options head
for (var ${2:i}=0; $2 < ${1:Things}.length; $2++) { for (var ${2:i}=0; $2 < ${1:#:Things}.length; $2++) {
${0} ${0:TARGET}
} }
snippet forin snippet forin
options head options head
for (var ${2:i} in ${1:Things}) { for (var ${2:i} in ${1:#:Things}) {
${0} ${0:TARGET}
}; };
snippet ;, snippet ;,
options word options word
${1:value_name}:${0:value}, ${1:#:value_name}:${0:#:value},
snippet key snippet key
options word options word
${1:key}: "${2:value}"}${3:, } ${1:#:key}: "${2:#:value}"}${3:, }
snippet timeout snippet timeout
options head options head

View File

@ -2,26 +2,26 @@
snippet func snippet func
alias function name(args)...end alias function name(args)...end
options word options word
function ${1:function_name}(${2:argument}) function ${1:#:function_name}(${2:#:argument})
${0:// body...} ${0:TARGET}
end end
snippet if snippet if
options head options head
if (${1:true}) then if (${1:#:condition}) then
${0:$TM_SELECTED_TEXT} ${0:TARGET}
end end
snippet for snippet for
options head options head
for ${2:i} = 0, ${1:Things} do for ${2:i} = 0, ${1:#:Things} do
${0} ${0:TARGET}
end end
snippet forin snippet forin
options head options head
for ${2:k}, ${3:v} in ${1:ipairs(xs)} do for ${2:k}, ${3:v} in ${1:ipairs(xs)} do
${0} ${0:TARGET}
end end
snippet print_table snippet print_table
@ -30,3 +30,4 @@ abbr for k, v in ipairs(table) do
for k, v in ipairs(${1:table}) do for k, v in ipairs(${1:table}) do
print(k, v) print(k, v)
end end

View File

@ -1,35 +1,35 @@
snippet link snippet link
abbr [link][] abbr [link][]
[${1:link_id}][]${2} [${1:#:link_id}][]${2}
snippet linkid snippet linkid
abbr [link][id] abbr [link][id]
[${1:link}][${2:id}]${3} [${1:#:link}][${2:id}]${3}
snippet linkurl snippet linkurl
abbr [link](url) abbr [link](url)
[${1:link}](http://${2:url})${3} [${1:#:link}](http://${2:#:url})${3}
snippet linkemail snippet linkemail
abbr [link](email) abbr [link](email)
[${1:link}](mailto:${2:email})${3} [${1:#:link}](mailto:${2:#:email})${3}
snippet linkurltitle snippet linkurltitle
abbr [link](url "title") abbr [link](url "title")
[${1:link}](${2:url} "${3:title}")${4} [${1:#:link}](${2:#:url} "${3:#:title}")${4}
snippet idurl snippet idurl
abbr [id]: url "title" abbr [id]: url "title"
[${1:id}]: http://${2:url} "${3:title}" [${1:#:id}]: http://${2:#:url} "${3:#:title}"
snippet idemail snippet idemail
abbr [id]: email "title" abbr [id]: email "title"
[${1:id}]: mailto:${2:url} "${3:title}" [${1:#:id}]: mailto:${2:#:url} "${3:#:title}"
snippet altid snippet altid
abbr ![alt][id] abbr ![alt][id]
![${1:alt}][${2:id}]${3} ![${1:#:alt}][${2:#:id}]${3}
snippet alturl snippet alturl
abbr ![alt](url) abbr ![alt](url)
![${1:alt}](${2:url})${3} ![${1:#:alt}](${2:#:url})${3}
snippet alturltitle snippet alturltitle
abbr ![alt](url "title") abbr ![alt](url "title")
![${1:alt}](${2:url} "${3:title}")${4} ![${1:#:alt}](${2:#:url} "${3:#:title}")${4}
snippet emphasis1 snippet emphasis1
abbr *emphasis* abbr *emphasis*
@ -49,3 +49,4 @@ abbr __strong__
snippet code snippet code
abbr `code` abbr `code`
\`${1}\`${2} \`${1}\`${2}

View File

@ -1,5 +1,5 @@
snippet sel snippet sel
@selector(${1:method}:) @selector(${1:#:method}:)
snippet imp snippet imp
@ -32,7 +32,6 @@ abbr Class
} }
@end @end
snippet cli snippet cli
abbr ClassInterface abbr ClassInterface
@interface ${1} : ${2:NSObject} @interface ${1} : ${2:NSObject}
@ -41,7 +40,6 @@ abbr ClassInterface
${0} ${0}
@end @end
snippet clm snippet clm
abbr ClassImplementation abbr ClassImplementation
@implementation ${1:object} @implementation ${1:object}
@ -54,7 +52,6 @@ abbr ClassImplementation
} }
@end @end
snippet cat snippet cat
abbr Category abbr Category
@interface ${1:NSObject} (${2:Category}) @interface ${1:NSObject} (${2:Category})
@ -64,60 +61,55 @@ abbr Category
${0} ${0}
@end @end
snippet cati snippet cati
abbr CategoryInterface abbr CategoryInterface
@interface ${1:NSObject)} (${2:Category)}) @interface ${1:NSObject)} (${2:Category)})
${0} ${0}
@end @end
snippet array snippet array
NSMutableArray *${1:array} = [NSMutableArray array]; NSMutableArray *${1:#:array} = [NSMutableArray array];
snippet dict snippet dict
NSMutableDictionary *${1:dict} = [NSMutableDictionary dictionary]; NSMutableDictionary *${1:#:dict} = [NSMutableDictionary dictionary];
snippet bez snippet bez
NSBezierPath *${1:path} = [NSBezierPath bezierPath]; NSBezierPath *${1:#:path} = [NSBezierPath bezierPath];
${0}
snippet m snippet m
abbr Method abbr Method
- (${1:id})${2:method}${3:(id)}${4:anArgument} - (${1:#:id})${2:#:method}${3:(#:id)}${4:#:anArgument}
{ {
${0} ${0}
return nil; return nil;
} }
snippet M snippet M
abbr Method abbr Method
- (${1:id})${2:method}${3:(id)}${4:anArgument}; - (${1:#:id})${2:#:method}${3:(#:id)}${4:#:anArgument};
snippet cm snippet cm
abbr ClassMethod abbr ClassMethod
+ (${1:id})${2:method}${3:(id)}${4:anArgument} + (${1:#:id})${2:#:method}${3:(#:id)}${4:#:anArgument}
{ {
${0} ${0}
return nil; return nil;
} }
snippet icm snippet icm
abbr InterfaceClassMethod abbr InterfaceClassMethod
+ (${1:id})${0:method}; + (${1:#:id})${0:#:method};
snippet sm snippet sm
abbr SubMethod abbr SubMethod
- (${1:id})${2:method}${3:(id)}${4:anArgument} - (${1:#:id})${2:#:method}${3:(#:id)}${4:#:anArgument}
{ {
${1} res = [super ${2:method}] ${1} res = [super ${2:#:method}]
return res; return res;
} }
@ -131,9 +123,8 @@ abbr MethodInitialize
nil]]; nil]];
} }
snippet obj snippet obj
- (${1:id})${2:thing} - (${1:#:id})${2:#:thing}
{ {
return ${2}; return ${2};
} }
@ -147,12 +138,11 @@ snippet obj
snippet iobj snippet iobj
- (${1:id})${2:thing}; - (${1:#:id})${2:#:thing};
- (void)set${2}:(${1})aValue; - (void)set${2}:(${1})aValue;
snippet str snippet str
- (NSString${$1: *)})${1:thing} - (NSString${$1: *)})${1:#:thing}
{ {
return ${2}; return ${2};
} }
@ -164,38 +154,35 @@ snippet str
${2} = ${3}; ${2} = ${3};
} }
snippet istr snippet istr
- (NSString${1: *)}${1:thing}; - (NSString${1: *)}${1:#:thing};
- (void)set${1}:(NSString${2: *})${2}; - (void)set${1}:(NSString${2: *})${2};
snippet cd snippet cd
abbr CoreData abbr CoreData
- (${1:id})${2:attribute} - (${1:#:id})${2:#:attribute}
{ {
[self willAccessValueForKey:@"${2: attribute}"]; [self willAccessValueForKey:@"$2"];
${1:id} value = [self primitiveValueForKey:@"${2: attribute}"]; $1 value = [self primitiveValueForKey:@"$2"];
[self didAccessValueForKey:@"${2: attribute}"]; [self didAccessValueForKey:@"$2"];
return value; return value;
} }
- (void)set${2}:(${1})aValue - (void)set$2:($1)aValue
{ {
[self willChangeValueForKey:@"${2: attribute}"]; [self willChangeValueForKey:@"$2"];
[self setPrimitiveValue:aValue forKey:@"${2: attribute}"]; [self setPrimitiveValue:aValue forKey:@"$2"];
[self didChangeValueForKey:@"${2: attribute}"]; [self didChangeValueForKey:@"$2"];
} }
snippet karray snippet karray
abbr KVCArry abbr KVCArry
- (void)addObjectTo${1:Things}:(${2:id})anObject - (void)addObjectTo${1:#:Things}:(${2:#:id})anObject
{ {
[${3}} addObject:anObject]; [${3}} addObject:anObject];
} }
- (void)insertObject:(${2})anObject in${1}AtIndex:(unsigned int)i - (void)insertObject:($2)anObject in$1AtIndex:(unsigned int)i
{ {
[${3} insertObject:anObject atIndex:i]; [${3} insertObject:anObject atIndex:i];
} }
@ -233,7 +220,7 @@ abbr KVCArry
snippet iarray snippet iarray
abbr InterfaceAccessorsForKVCArray abbr InterfaceAccessorsForKVCArray
- (void)addObjectTo${1:Things}:(${2:id})anObject; - (void)addObjectTo${1:#:Things}:(${2:#:id})anObject;
- (void)insertObject:(${2})anObject in${1}AtIndex:(unsigned int)i; - (void)insertObject:(${2})anObject in${1}AtIndex:(unsigned int)i;
- (${2})objectIn${1}AtIndex:(unsigned int)i; - (${2})objectIn${1}AtIndex:(unsigned int)i;
- (unsigned int)indexOfObjectIn${1}:(${2})anObject; - (unsigned int)indexOfObjectIn${1}:(${2})anObject;
@ -245,7 +232,7 @@ abbr InterfaceAccessorsForKVCArray
snippet acc snippet acc
abbr PrimitiveType abbr PrimitiveType
- (${1:unsigned int})${2:thing} - (${1:unsigned int})${2:#:thing}
{ {
return ${3}; return ${3};
} }
@ -261,7 +248,6 @@ abbr Interface:AccessorsForPrimitiveType
- (${1:unsigned int})${2:thing}; - (${1:unsigned int})${2:thing};
- (void)set${2}:($1)new${2}; - (void)set${2}:($1)new${2};
snippet rdef snippet rdef
abbr ReadDefaultsValue abbr ReadDefaultsValue
[[NSUserDefaults standardUserDefaults] objectForKey:${1:key}]; [[NSUserDefaults standardUserDefaults] objectForKey:${1:key}];
@ -278,11 +264,11 @@ abbr IBOutlet
snippet syn snippet syn
@synthesize ${1:property}; @synthesize ${1:#:property};
snippet bind snippet bind
bind:@"${2:binding}" toObject:${3:observableController} withKeyPath:@"${4:keyPath}" options:${5:nil} bind:@"${2:#:binding}" toObject:${3:observableController} withKeyPath:@"${4:keyPath}" options:${5:nil}
snippet reg snippet reg
@ -294,7 +280,6 @@ snippet focus
${0} ${0}
[self unlockFocus]; [self unlockFocus];
snippet forarray snippet forarray
unsigned int ${1:object}Count = [${2:array} count]; unsigned int ${1:object}Count = [${2:array} count];
@ -304,7 +289,6 @@ snippet forarray
${0} ${0}
} }
snippet alert snippet alert
int choice = NSRunAlertPanel(@"${1:Something important!}", @"${2:Something important just happend, and now I need to ask you, do you want to continue?}", @"${3:Continue}", @"${4:Cancel}", nil); int choice = NSRunAlertPanel(@"${1:Something important!}", @"${2:Something important just happend, and now I need to ask you, do you want to continue?}", @"${3:Continue}", @"${4:Cancel}", nil);
if(choice == NSAlertDefaultReturn) // "${3:Continue}" if(choice == NSAlertDefaultReturn) // "${3:Continue}"
@ -316,7 +300,6 @@ snippet alert
} }
snippet res snippet res
${1} Send ${2} to ${1}, if ${1} supports it}${3} ${1} Send ${2} to ${1}, if ${1} supports it}${3}
if ([${1:self} respondsToSelector:@selector(${2:someSelector:})]) if ([${1:self} respondsToSelector:@selector(${2:someSelector:})])
@ -324,7 +307,6 @@ snippet res
[${1} ${3}]; [${1} ${3}];
} }
snippet del snippet del
if([${1:[self delegate]} respondsToSelector:@selector(${2:selfDidSomething:})]) if([${1:[self delegate]} respondsToSelector:@selector(${2:selfDidSomething:})])
[${1} ${3}]; [${1} ${3}];
@ -341,7 +323,7 @@ snippet save
snippet thread snippet thread
[NSThread detachNewThreadSelector:@selector(${1:method}:) toTarget:${2:aTarget} withObject:${3:anArgument}] [NSThread detachNewThreadSelector:@selector(${1:#:method}:) toTarget:${2:#:aTarget} withObject:${3:#:anArgument}]
snippet pool snippet pool
@ -349,4 +331,3 @@ snippet pool
${0} ${0}
[pool drain]; [pool drain];

View File

@ -6,71 +6,72 @@ snippet perl
${1} ${1}
snippet sub snippet sub
sub ${1:function_name} { sub ${1:#:function_name} {
${2:# body...} ${2:TARGET}
} }
snippet if snippet if
if (${1}) { if (${1:#:condition}) {
${2:# body...} ${2:TARGET}
} }
snippet ife snippet ife
if (${1}) { if (${1:#:condition}) {
${2:# body...} ${2:TARGET}
} else { } else {
${3:# else...} ${3:#:else...}
} }
snippet ifee snippet ifee
if (${1}) { if (${1:#:condition}) {
${2:# body...} ${2:TARGET}
} elsif (${3}) { } elsif (${3}) {
${4:# elsif...} ${4:#:elsif...}
} else { } else {
${5:# else...} ${5:#:else...}
} }
snippet xif snippet xif
${1:expression} if ${2:condition}; ${1:#:expression} if ${2:#:condition};
snippet while snippet while
abbr wh abbr wh
while (${1}) { while (${1:#:condition}) {
${2:# body...} ${2:TARGET}
} }
snippet xwhile snippet xwhile
abbr xwh abbr xwh
${1:expression} while ${2:condition}; ${1:#:expression} while ${2:#:condition};
snippet for snippet for
for (my $${1:var} = 0; $$1 < ${2:expression}; $$1++) { for (my $${1:#:var} = 0; $$1 < ${2:#:expression}; $$1++) {
${3:# body...} ${3:TARGET}
} }
snippet fore snippet fore
for ${1} (${2:expression}){ for ${1} (${2:#:expression}){
${3:# body...} ${3:TARGET}
} }
snippet xfor snippet xfor
${1:expression} for @${2:array}; ${1:#:expression} for @${2:#:array};
snippet unless snippet unless
abbr un abbr un
unless (${1}) { unless (${1:condition}) {
${2:# body...} ${2:TARGET}
} }
snippet xunless snippet xunless
abbr xun abbr xun
${1:expression} unless ${2:condition}; ${1:#:expression} unless ${2:#:condition};
snippet eval snippet eval
eval { eval {
${1:# do something risky...} ${1:TARGET}
}; };
if ($@) { if ($@) {
${2:# handle failure...} ${2:#:handle failure...}
} }

View File

@ -1,13 +1,13 @@
snippet function snippet function
abbr function () {} abbr function () {}
${1:public }function ${2:FunctionName}(${3}) ${1:public }function ${2:#:FunctionName}(${3})
{ {
${4:// code...} ${4:TARGET}
} }
snippet php snippet php
<?php <?php
${1} ${1:TARGET}
?> ?>
snippet pecho snippet pecho
@ -17,20 +17,20 @@ snippet echoh
<?php echo htmlentities(${1}, ENT_QUOTES, 'utf-8') ?>${0} <?php echo htmlentities(${1}, ENT_QUOTES, 'utf-8') ?>${0}
snippet pfore snippet pfore
<?$php foreach ($${1:variable} as $${2:key}${3: =>}): ?> <?$php foreach ($${1:#:variable} as $${2:#:key}${3: =>}): ?>
${0} ${0:TARGET}
<?php endforeach ?> <?php endforeach ?>
snippet pife snippet pife
<?php if (${1:condition}): ?> <?php if (${1:#:condition}): ?>
${2} ${2:TARGET}
<?php else: ?> <?php else: ?>
${0} ${0}
<?php endif ?> <?php endif ?>
snippet pif snippet pif
<?php if (${1:condition}): ?> <?php if (${1:#:condition}): ?>
${0} ${0:TARGET}
<?php endif ?> <?php endif ?>
snippet pelse snippet pelse
@ -44,21 +44,21 @@ snippet ethis
snippet docc snippet docc
/** /**
* ${3:undocumented class variable} * ${3:#:undocumented class variable}
* *
* @var ${4:string} * @var ${4:#:string}
**/ **/
${1:var} $${2};${0} ${1:#:var} $${2};${0}
snippet docd snippet docd
/** /**
* ${3:undocumented constant} * ${3:#:undocumented constant}
**/ **/
define(${1} ${2});${0} define(${1} ${2});${0}
snippet docs snippet docs
/** /**
* ${4:undocumented function} * ${4:#:undocumented function}
* *
* @return ${5:void} * @return ${5:void}
* @author ${6} * @author ${6}
@ -67,14 +67,14 @@ snippet docs
snippet docf snippet docf
/** /**
* ${4:undocumented function} * ${4:#:undocumented function}
* *
* @return ${5:void} * @return ${5:void}
* @author ${6} * @author ${6}
**/ **/
${1}function ${2}(${3}) ${1}function ${2}(${3})
{ {
${0} ${0:TARGET}
} }
@ -94,15 +94,15 @@ snippet doch
snippet doci snippet doci
/** /**
* ${2:undocumented class} * ${2:#:undocumented class}
* *
* @package ${3:default} * @package ${3:default}
* @author ${4} * @author ${4}
**/ **/
interface ${1} interface ${1}
{ {
${0} ${0:TARGET}
} // END interface ${1} } // END interface $1
snippet c snippet c
/** /**
@ -113,10 +113,10 @@ snippet class
/** /**
* ${1} * ${1}
*/ */
class ${2:ClassName}${3:extends}} class ${2:#:ClassName}${3:#:extends}}
{ {
$5 $5
function ${4:__construct}(${5:argument}) function ${4:__construct}(${5:#:argument})
{ {
${0:# code...} ${0:# code...}
} }
@ -128,73 +128,73 @@ snippet def
snippet do snippet do
do { do {
${0:# code...} ${0:TARGET}
} while (${1}); } while (${1:#:condition});
snippet if? snippet if?
$${1:retVal} = (${2:condition}) ? ${3:a} : ${4:b} ; $${1:#:retVal} = (${2:#:condition}) ? ${3:#:a} : ${4:#:b};
snippet ifelse snippet ifelse
if (${1:condition}) { if (${1:#:condition}) {
${2:# code...} ${2:TARGET}
} else { } else {
${3:# code...} ${3:#:code...}
} }
${0} ${0}
snippet if snippet if
if (${1:condition}) { if (${1:#:condition}) {
${0:# code...} ${0:TARGET}
} }
snippet echo snippet echo
echo "${1:string}"${0}; echo "${1:#:string}"${0};
snippet else snippet else
else { else {
${0:# code...} ${0:TARGET}
} }
snippet elseif snippet elseif
elseif (${1:condition}) { elseif (${1:#:condition}) {
${0:# code...} ${0:TARGET}
} }
snippet for snippet for
for ($${1:i}=${2:0}; $${1:i} < ${3}; $${1:i}++) { for ($${1:i}=${2:0}; $$1 < ${3}; $$1++) {
${0:# code...} ${0:TARGET}
} }
snippet fore snippet fore
foreach ($${1:variable} as $${2:key}${3: =>} $${4:value}) { foreach ($${1:#:variable} as $${2:#:key}${3: =>} $${4:#:value}) {
${0:# code...} ${0:TARGET}
} }
snippet con snippet con
function __construct(${1}) function __construct(${1})
{ {
${0} ${0:TARGET}
} }
snippet here snippet here
<<<${1:HTML} <<<${1:HTML}
${2:content here} ${2:TARGET:#:content here}
$1; $1;
snippet inc snippet inc
include '${1:file}';${0} include '${1:#:file}';${0}
snippet inco snippet inco
include_once '${1:file}';${0} include_once '${1:#:file}';${0}
snippet array snippet array
$${1:arrayName} = array('${2}' => ${3} ${0}); $${1:#:arrayName} = array('${2}' => ${3} ${0});
snippet req snippet req
require '${1:file}';${0} require '${1:#:file}';${0}
snippet reqo snippet reqo
require_once '${1:file}';${0} require_once '${1:#:file}';${0}
snippet ret snippet ret
return${1};${0} return${1};${0}
@ -206,55 +206,56 @@ snippet rett
return true; return true;
snippet case snippet case
case '${1:variable}': case '${1:#:variable}':
${0:# code...} ${0:#:code...}
break; break;
snippet switch snippet switch
abbr sw abbr sw
switch (${1:variable}) { switch (${1:#:variable}) {
case '${2:value}': case '${2:#:value}':
${3:# code...} ${3:#:code...}
break; break;
${0} ${0}
default: default:
${4:# code...} ${4:#:code...}
break; break;
} }
snippet throw snippet throw
throw new ${1}Exception(${2:"${3:Error Processing Request}"}${4:}); throw new ${1}Exception(${2:"${3:#:Error Processing Request}"}${4:});
${0} ${0}
snippet while snippet while
abbr wh abbr wh
while (${1}) { while (${1}) {
${0:# code...} ${0:TARGET}
} }
snippet gloabals snippet gloabals
\$GLOBALS['${1:variable}']${2: = }${3:something}${4:;}${0} \$GLOBALS['${1:#:variable}']${2: = }${3:#:something}${4:;}${0}
snippet cookie snippet cookie
\$_COOKIE['${1:variable}'] \$_COOKIE['${1:#:variable}']
snippet env snippet env
\$_ENV['${1:variable}'] \$_ENV['${1:#:variable}']
snippet files snippet files
\$_FILES['${1:variable}'] \$_FILES['${1:#:variable}']
snippet get snippet get
\$_GET['${1:variable}'] \$_GET['${1:#:variable}']
snippet post snippet post
\$_POST['${1:variable}'] \$_POST['${1:#:variable}']
snippet request snippet request
\$_REQUEST['${1:variable}'] \$_REQUEST['${1:#:variable}']
snippet server snippet server
\$_SERVER['${1:variable}'] \$_SERVER['${1:#:variable}']
snippet session snippet session
\$_SESSION['${1:variable}'] \$_SESSION['${1:#:variable}']

View File

@ -18,27 +18,27 @@ snippet def
abbr def function(...): ... abbr def function(...): ...
options head options head
def ${1:#:name}(${2}): def ${1:#:name}(${2}):
${0} ${0:TARGET}
snippet defd snippet defd
abbr def function(...): """...""" abbr def function(...): """..."""
options head options head
def ${1:#:name}(${2}): def ${1:#:name}(${2}):
"""${3:#:function documentation}""" """${3:#:function documentation}"""
${0} ${0:TARGET}
snippet defm snippet defm
abbr def method(self, ...): ... abbr def method(self, ...): ...
options head options head
def ${1:#:name}(self, ${2}): def ${1:#:name}(self, ${2}):
${0} ${0:TARGET}
snippet defmd snippet defmd
abbr def method(self, ...): "..." abbr def method(self, ...): "..."
options head options head
def ${1:name}(self, ${2}): def ${1:#:name}(self, ${2}):
"""${3:#:method documentation}""" """${3:#:method documentation}"""
${0} ${0:TARGET}
snippet elif snippet elif
abbr elif ...: ... abbr elif ...: ...
@ -58,7 +58,7 @@ options head
${1:f} = None ${1:f} = None
try: try:
$1 = open(${2}) $1 = open(${2})
${0} ${0:TARGET}
finally: finally:
if $1: if $1:
$1.close() $1.close()
@ -67,25 +67,25 @@ snippet for
abbr for ... in ...: ... abbr for ... in ...: ...
options head options head
for ${1:#:value} in ${2:#:list}: for ${1:#:value} in ${2:#:list}:
${0} ${0:TARGET}
snippet if snippet if
abbr if ...: ... abbr if ...: ...
options head options head
if ${1:#:condition}: if ${1:#:condition}:
${0} ${0:TARGET}
snippet ifmain snippet ifmain
abbr if __name__ == '__main__': ... abbr if __name__ == '__main__': ...
options head options head
if __name__ == '__main__': if __name__ == '__main__':
${0} ${0:TARGET}
snippet tryexcept snippet tryexcept
abbr try: ... except ...: ... abbr try: ... except ...: ...
options head options head
try: try:
${1} ${1:TARGET}
except ${2:#:ExceptionClass}: except ${2:#:ExceptionClass}:
${3} ${3}
@ -93,7 +93,7 @@ snippet tryfinally
abbr try: ... finally: ... abbr try: ... finally: ...
options head options head
try: try:
${1} ${1:TARGET}
finally: finally:
${2} ${2}
@ -101,5 +101,5 @@ snippet while
abbr while ...: ... abbr while ...: ...
options head options head
while ${1:#:condition}: while ${1:#:condition}:
${0} ${0:TARGET}

View File

@ -161,3 +161,4 @@ abbr :object =>
snippet partial snippet partial
abbr :partial => abbr :partial =>
:partial => :partial =>

View File

@ -1,52 +1,52 @@
snippet if snippet if
abbr if ... end abbr if ... end
if ${1:condition} if ${1:#:condition}
${2} ${2:TARGET}
end end
snippet def snippet def
abbr def ... end abbr def ... end
def ${1:method_name} def ${1:#:method_name}
${2} ${2:TARGET}
end end
snippet defrescue snippet defrescue
alias defr alias defr
abbr def ... rescue ... end abbr def ... rescue ... end
def ${1:method_name} def ${1:#:method_name}
${2} ${2:TARGET}
rescue ${3:StandardError} => ${4:error} rescue ${3:#:StandardError} => ${4:error}
${5} ${5}
end end
snippet do snippet do
abbr do ... end abbr do ... end
do do
${1} ${1:TARGET}
end end
snippet dovar snippet dovar
abbr do |var| ... end abbr do |var| ... end
do |${1:var}| do |${1:#:var}|
${2} ${2:TARGET}
end end
snippet block snippet block
abbr { ... } abbr { ... }
{ {
${1} ${1:TARGET}
} }
snippet blockvar snippet blockvar
abbr {|var| ... } abbr {|var| ... }
{|${1:var}| {|${1:#:var}|
${2} ${2:TARGET}
} }
snippet fileopen snippet fileopen
abbr File.open(filename) do ... end abbr File.open(filename) do ... end
File.open(${1:filename}, '${2:w}') do |${3:io}| File.open(${1:#:filename}, '${2:#:mode}') do |${3:io}|
${0} ${0:TARGET}
end end
snippet edn snippet edn

View File

@ -8,7 +8,7 @@ snippet try
abbr try {} catch { case ... } abbr try {} catch { case ... }
options head options head
try { try {
${1} ${1:TARGET}
} catch { } catch {
case e${2:: Exception} => ${0} case e${2:: Exception} => ${0}
} }
@ -19,13 +19,13 @@ abbr println()
snippet pn snippet pn
abbr println('name, name) abbr println('name, name)
println('${1:name}, $1) println('${1:#:name}, $1)
snippet main snippet main
abbr def main(args: Array[String]) { abbr def main(args: Array[String]) {
options head options head
def main(args: Array[String]) { def main(args: Array[String]) {
${0} ${0:TARGET}
} }
snippet hello snippet hello
@ -39,3 +39,4 @@ options head
# scala's indent plugin doesn't work well. use hard-tab for this snippet. # scala's indent plugin doesn't work well. use hard-tab for this snippet.
# vim: set noexpandtab : # vim: set noexpandtab :

View File

@ -1,50 +1,48 @@
snippet if snippet if
if [ ${1:condition} ]; then if [ ${1:#:condition} ]; then
${0:#statements} ${0:TARGET}
fi fi
snippet el snippet el
else else
${0:#statements} ${0:TARGET}
snippet elif snippet elif
elif [ ${1:condition} ]; then elif [ ${1:#:condition} ]; then
${0:#statements} ${0:TARGET}
snippet for snippet for
for ${1:i} in ${2:words}; do for ${1:i} in ${2:#:words}; do
${0:#statements} ${0:TARGET}
done done
snippet wh snippet wh
abbr while abbr while
while ${1:condition} ; do while ${1:#:condition} ; do
${0:#statements} ${0:TARGET}
done done
snippet until snippet until
until ${1:condition} ; do until ${1:#:condition} ; do
${0:#statements} ${0:TARGET}
done done
snippet case snippet case
case ${1:word} in case ${1:#:word} in
${2:pattern} ) ${2:#:pattern} )
${0} ${0}
;; ;;
esac esac
snippet here
snippet h alias h
<<${1} <<${1}
${0} ${0:TARGET}
snippet env snippet env
#!/usr/bin/env ${1} #!/usr/bin/env ${1}
@ -55,5 +53,5 @@ snippet tmp
trap "rm -f '$${1}'" 0 # EXIT trap "rm -f '$${1}'" 0 # EXIT
trap "rm -f '$${1}'; exit 1" 2 # INT trap "rm -f '$${1}'; exit 1" 2 # INT
trap "rm -f '$${1}'; exit 1" 1 15 # HUP TERM trap "rm -f '$${1}'; exit 1" 1 15 # HUP TERM
${0} ${0}

View File

@ -2,7 +2,8 @@ snippet snippet
abbr snippet abbr options <snippet code> abbr snippet abbr options <snippet code>
alias snip alias snip
options head options head
snippet ${1:trigger} snippet ${1:#:trigger}
abbr ${2:abbr} abbr ${2:#:abbr}
options head options head
${3:snippet code} ${3:#:TARGET}

View File

@ -1,209 +1,209 @@
snippet mathexpression snippet mathexpression
abbr $ expression $ abbr $ expression $
$${1:expression}$${2} $${1:#:expression}$${2}
# ========== ENVIRONMENT ========== # ========== ENVIRONMENT ==========
snippet begin snippet begin
alias \begin alias \begin
\begin{${1:type}} \begin{${1:#:type}}
${2} ${2:TARGET}
\end{$1} \end{$1}
${0} ${0}
snippet list snippet list
alias \begin{list} alias \begin{list}
\begin{list} \begin{list}
${1} ${1:TARGET}
\end{list} \end{list}
${0} ${0}
snippet quotation snippet quotation
alias \begin{quotation} alias \begin{quotation}
\begin{quotation} \begin{quotation}
${1} ${1:TARGET}
\end{quotation} \end{quotation}
${0} ${0}
snippet description snippet description
alias \begin{description} alias \begin{description}
\begin{description} \begin{description}
\item ${1} \item ${1:TARGET}
\end{description} \end{description}
${0} ${0}
snippet sloppypar snippet sloppypar
alias \begin{sloppypar} alias \begin{sloppypar}
\begin{sloppypar} \begin{sloppypar}
${1} ${1:TARGET}
\end{sloppypar} \end{sloppypar}
${0} ${0}
snippet enumerate snippet enumerate
alias \begin{enumerate} alias \begin{enumerate}
\begin{enumerate} \begin{enumerate}
\item ${1} \item ${1:TARGET}
\end{enumerate} \end{enumerate}
${0} ${0}
snippet theindex snippet theindex
alias \begin{theindex} alias \begin{theindex}
\begin{theindex} \begin{theindex}
${1} ${1:TARGET}
\end{theindex} \end{theindex}
${0} ${0}
snippet itemize snippet itemize
alias \begin{itemize} alias \begin{itemize}
\begin{itemize} \begin{itemize}
\item ${1} \item ${1:TARGET}
\end{itemize} \end{itemize}
${0} ${0}
snippet titlepage snippet titlepage
alias \begin{titlepage} alias \begin{titlepage}
\begin{titlepage} \begin{titlepage}
${1} ${1:TARGET}
\end{titlepage} \end{titlepage}
${0} ${0}
snippet verbatim snippet verbatim
alias \begin{verbatim} alias \begin{verbatim}
\begin{verbatim} \begin{verbatim}
${1} ${1:TARGET}
\end{verbatim} \end{verbatim}
${0} ${0}
snippet verbatimtab snippet verbatimtab
alias \begin{verbatimtab} alias \begin{verbatimtab}
\begin{verbatimtab}[${1:8}] \begin{verbatimtab}[${1:8}]
${2} ${2:TARGET}
\end{verbatim} \end{verbatim}
${0} ${0}
snippet trivlist snippet trivlist
alias \begin{trivlist} alias \begin{trivlist}
\begin{trivlist} \begin{trivlist}
${1} ${1:TARGET}
\end{trivlist} \end{trivlist}
${0} ${0}
snippet verse snippet verse
alias \begin{verse} alias \begin{verse}
\begin{verse} \begin{verse}
${1} ${1:TARGET}
\end{verse} \end{verse}
${0} ${0}
snippet table snippet table
alias \begin{table} alias \begin{table}
\begin{table} \begin{table}
${1} ${1:TARGET}
\end{table} \end{table}
${0} ${0}
snippet thebibliography snippet thebibliography
alias \begin{thebibliography} alias \begin{thebibliography}
\begin{thebibliography} \begin{thebibliography}
${1} ${1:TARGET}
\end{thebibliography} \end{thebibliography}
${0} ${0}
snippet tabbing snippet tabbing
alias \begin{tabbing} alias \begin{tabbing}
\begin{tabbing} \begin{tabbing}
${1} ${1:TARGET}
\end{tabbing} \end{tabbing}
${0} ${0}
snippet note snippet note
alias \begin{note} alias \begin{note}
\begin{note} \begin{note}
${1} ${1:TARGET}
\end{note} \end{note}
${0} ${0}
snippet tabular snippet tabular
alias \begin{tabular} alias \begin{tabular}
\begin{tabular}{${1}} \begin{tabular}{${1}}
${2} ${2:TARGET}
\end{tabular} \end{tabular}
${0} ${0}
snippet overlay snippet overlay
alias \begin{overlay} alias \begin{overlay}
\begin{overlay} \begin{overlay}
${1} ${1:TARGET}
\end{overlay} \end{overlay}
${0} ${0}
snippet array snippet array
alias \begin{array} alias \begin{array}
\begin{array} \begin{array}
${1} ${1:TARGET}
\end{array} \end{array}
${0} ${0}
snippet slide snippet slide
alias \begin{slide} alias \begin{slide}
\begin{slide} \begin{slide}
${1} ${1:TARGET}
\end{slide} \end{slide}
${0} ${0}
snippet displaymath snippet displaymath
alias \begin{displaymath} alias \begin{displaymath}
\begin{displaymath} \begin{displaymath}
${1} ${1:TARGET}
\end{displaymath} \end{displaymath}
${0} ${0}
snippet abstract snippet abstract
alias \begin{abstract} alias \begin{abstract}
\begin{abstract} \begin{abstract}
${1} ${1:TARGET}
\end{abstract} \end{abstract}
${0} ${0}
snippet eqnarray snippet eqnarray
alias \begin{eqnarray} alias \begin{eqnarray}
\begin{eqnarray} \begin{eqnarray}
${1} ${1:TARGET}
\end{eqnarray} \end{eqnarray}
${0} ${0}
snippet eqnarray* snippet eqnarray*
alias \begin{eqnarray*} alias \begin{eqnarray*}
\begin{eqnarray*} \begin{eqnarray*}
${1} ${1:TARGET}
\end{eqnarray} \end{eqnarray}
${0} ${0}
snippet appendix snippet appendix
alias \begin{appendix} alias \begin{appendix}
\begin{appendix} \begin{appendix}
${1} ${1:TARGET}
\end{appendix} \end{appendix}
${0} ${0}
snippet equation snippet equation
alias \begin{equation} alias \begin{equation}
\begin{equation} \begin{equation}
${1} ${1:TARGET}
\end{equation} \end{equation}
${0} ${0}
snippet center snippet center
alias \begin{center} alias \begin{center}
\begin{center} \begin{center}
${1} ${1:TARGET}
\end{center} \end{center}
${0} ${0}
snippet document snippet document
alias \begin{document} alias \begin{document}
\begin{document} \begin{document}
${1} ${1:TARGET}
\end{document} \end{document}
${0} ${0}
@ -221,56 +221,56 @@ alias \begin{figure}
snippet filecontents snippet filecontents
alias \begin{filecontents} alias \begin{filecontents}
\begin{filecontents} \begin{filecontents}
${1} ${1:TARGET}
\end{filecontents} \end{filecontents}
${0} ${0}
snippet lrbox snippet lrbox
alias \begin{lrbox} alias \begin{lrbox}
\begin{lrbox} \begin{lrbox}
${1} ${1:TARGET}
\end{lrbox} \end{lrbox}
${0} ${0}
snippet flushleft snippet flushleft
alias \begin{flushleft} alias \begin{flushleft}
\begin{flushleft} \begin{flushleft}
${1} ${1:TARGET}
\end{flushleft} \end{flushleft}
${0} ${0}
snippet minipage snippet minipage
alias \begin{minipage} alias \begin{minipage}
\begin{minipage} \begin{minipage}
${1} ${1:TARGET}
\end{minipage} \end{minipage}
${0} ${0}
snippet flushright snippet flushright
alias \begin{flushright} alias \begin{flushright}
\begin{flushright} \begin{flushright}
${1} ${1:TARGET}
\end{flushright} \end{flushright}
${0} ${0}
snippet picture snippet picture
alias \begin{picture} alias \begin{picture}
\begin{picture} \begin{picture}
${1} ${1:TARGET}
\end{picture} \end{picture}
${0} ${0}
snippet math snippet math
alias \begin{math} alias \begin{math}
\begin{math} \begin{math}
${1} ${1:TARGET}
\end{math} \end{math}
${0} ${0}
snippet quote snippet quote
alias \begin{quote} alias \begin{quote}
\begin{quote} \begin{quote}
${1} ${1:TARGET}
\end{quote} \end{quote}
${0} ${0}
@ -279,33 +279,33 @@ alias \begin{quote}
snippet part snippet part
alias \begin{part} alias \begin{part}
\begin{part} \begin{part}
${1} ${1:TARGET}
\end{part} \end{part}
${0} ${0}
snippet chapter snippet chapter
alias \begin{chapter} alias \begin{chapter}
\begin{chapter} \begin{chapter}
${1} ${1:TARGET}
\end{chapter} \end{chapter}
${0} ${0}
snippet \chapter snippet \chapter
alias \chapter{ alias \chapter{
\chapter{${1}} \chapter{${1}}
${0} ${0:TARGET}
snippet section snippet section
alias \begin{section} alias \begin{section}
\begin{section} \begin{section}
${1} ${1:TARGET}
\end{section} \end{section}
${0} ${0}
snippet \section snippet \section
alias \section{ alias \section{
\section{${1}} \section{${1}}
${0} ${0:TARGET}
snippet subsection snippet subsection
alias \begin{subsection} alias \begin{subsection}
@ -317,98 +317,98 @@ alias \begin{subsection}
snippet \subsection snippet \subsection
alias \subsection{ alias \subsection{
\subsection{${1}} \subsection{${1}}
${0} ${0:TARGET}
snippet subsubsection snippet subsubsection
alias \begin{subsubsection} alias \begin{subsubsection}
\begin{subsubsection} \begin{subsubsection}
${1} ${1:TARGET}
\end{subsubsection} \end{subsubsection}
${0} ${0}
snippet \subsubsection snippet \subsubsection
alias \subsubsection{ alias \subsubsection{
\subsubsection{${1}} \subsubsection{${1}}
${0} ${0:TARGET}
snippet paragraph snippet paragraph
alias \begin{paragraph} alias \begin{paragraph}
\begin{paragraph} \begin{paragraph}
${1} ${1:TARGET}
\end{paragraph} \end{paragraph}
${0} ${0}
snippet \paragraph snippet \paragraph
alias \paragraph{ alias \paragraph{
\paragraph{${1}} \paragraph{${1}}
${0} ${0:TARGET}
snippet subparagraph snippet subparagraph
alias \begin{subparagraph} alias \begin{subparagraph}
\begin{subparagraph} \begin{subparagraph}
${1} ${1:TARGET}
\end{subparagraph} \end{subparagraph}
${0} ${0}
snippet \subparagraph snippet \subparagraph
alias \subparagraph{ alias \subparagraph{
\subparagraph{${1}} \subparagraph{${1}}
${0} ${0:TARGET}
# ========== FONT ========== # ========== FONT ==========
snippet bfseries snippet bfseries
alias \begin{bfseries} alias \begin{bfseries}
\begin{bfseries} \begin{bfseries}
${1} ${1:TARGET}
\end{bfseries} \end{bfseries}
snippet mdseries snippet mdseries
alias \begin{mdseries} alias \begin{mdseries}
\begin{mdseries} \begin{mdseries}
${1} ${1:TARGET}
\end{mdseries} \end{mdseries}
snippet ttfamily snippet ttfamily
alias \begin{ttfamily} alias \begin{ttfamily}
\begin{ttfamily} \begin{ttfamily}
${1} ${1:TARGET}
\end{ttfamily} \end{ttfamily}
snippet sffamily snippet sffamily
alias \begin{sffamily} alias \begin{sffamily}
\begin{sffamily} \begin{sffamily}
${1} ${1:TARGET}
\end{sffamily} \end{sffamily}
snippet rmfamily snippet rmfamily
alias \begin{rmfamily} alias \begin{rmfamily}
\begin{rmfamily} \begin{rmfamily}
${1} ${1:TARGET}
\end{rmfamily} \end{rmfamily}
snippet upshape snippet upshape
alias \begin{upshape} alias \begin{upshape}
\begin{upshape} \begin{upshape}
${1} ${1:TARGET}
\end{upshape} \end{upshape}
snippet slshape snippet slshape
alias \begin{slshape} alias \begin{slshape}
\begin{slshape} \begin{slshape}
${1} ${1:TARGET}
\end{slshape} \end{slshape}
snippet scshape snippet scshape
alias \begin{scshape} alias \begin{scshape}
\begin{scshape} \begin{scshape}
${1} ${1:TARGET}
\end{scshape} \end{scshape}
snippet itshape snippet itshape
alias \begin{itshape} alias \begin{itshape}
\begin{itshape} \begin{itshape}
${1} ${1:TARGET}
\end{itshape} \end{itshape}
# ========== OTHERS ========== # ========== OTHERS ==========

View File

@ -7,7 +7,7 @@ options head
snippet elseif snippet elseif
options head options head
elseif ${1:/* condition */} elseif ${1:#:condition}
${0:TARGET} ${0:TARGET}
snippet ifelse snippet ifelse
@ -84,7 +84,7 @@ options head
snippet augroup snippet augroup
abbr augroup with autocmds abbr augroup with autocmds
options head options head
augroup ${1} augroup ${1:#:augroup_name}
autocmd! autocmd!
autocmd ${2:#:event} autocmd ${2:#:event}
augroup END augroup END

View File

@ -15,8 +15,9 @@ snippet doctypestrict
snippet xhtml snippet xhtml
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
${1} ${1:TARGET}
</html> </html>
snippet head snippet head
<head> <head>
<meta http-equiv="content-type" content="text/html; charset=${1:utf-8}"> <meta http-equiv="content-type" content="text/html; charset=${1:utf-8}">
@ -40,16 +41,16 @@ snippet metadescription
snippet scriptcharset snippet scriptcharset
<script type="text/javascript" charset="${1:UTF-8}"> <script type="text/javascript" charset="${1:UTF-8}">
${2} ${2:TARGET}
</script>${3} </script>${3}
snippet script snippet script
<script type="text/javascript"> <script type="text/javascript">
${1} ${1:TARGET}
</script>${2} </script>${2}
snippet body snippet body
<body> <body>
${1} ${1:TARGET}
</body> </body>
snippet h snippet h
@ -65,29 +66,29 @@ snippet hr
<hr /> <hr />
snippet comment snippet comment
<!--${1}-->${2} <!--${1:TARGET}-->${2}
snippet b snippet b
<b>${1}</b>${2} <b>${1:TARGET}</b>${2}
snippet small snippet small
<small>${1}</small>${2} <small>${1:TARGET}</small>${2}
snippet strong snippet strong
<strong>${1}</strong>${2} <strong>${1:TARGET}</strong>${2}
snippet sub snippet sub
<sub>${1}</sub>${2} <sub>${1:TARGET}</sub>${2}
snippet sup snippet sup
<sup>${1}</sup>${2} <sup>${1:TARGET}</sup>${2}
snippet ins snippet ins
<ins>${1}</ins>${2} <ins>${1:TARGET}</ins>${2}
snippet del snippet del
<del>${1}</del>${2} <del>${1:TARGET}</del>${2}
snippet em snippet em
<em>${1}</em>${2} <em>${1:TARGET}</em>${2}
snippet bdo snippet bdo
<bdo dir="${1:rtl}">${2}</bdo>${3} <bdo dir="${1:rtl}">${2:TARGET}</bdo>${3}
snippet pre snippet pre
<pre> <pre>
${1} ${1:TARGET}
</pre>${2} </pre>${2}
snippet blockquote snippet blockquote
<blockquote> <blockquote>
@ -109,66 +110,66 @@ snippet bgcolor
bgcolor="${1}"${2} bgcolor="${1}"${2}
snippet ahref snippet ahref
<a href="${1}">${2}</a>${3} <a href="${1}">${2:TARGET}</a>${3}
snippet ahref_blank snippet ahref_blank
<a href="${1}" target="_blank">${2}</a>${3} <a href="${1}" target="_blank">${2:TARGET}</a>${3}
snippet ahref_parent snippet ahref_parent
<a href="${1}" target="_parent">${2}</a>${3} <a href="${1}" target="_parent">${2:TARGET}</a>${3}
snippet ahref_top snippet ahref_top
<a href="${1}" target="_top">${2}</a>${3} <a href="${1}" target="_top">${2:TARGET}</a>${3}
snippet aname snippet aname
<a name="${1}">${2}</a>${3} <a name="${1}">${2:TARGET}</a>${3}
snippet framesetcols snippet framesetcols
<frameset cols="${1}"> <frameset cols="${1}">
${2} ${2:TARGET}
</frameset>${3} </frameset>${3}
snippet framesetrows snippet framesetrows
<frameset rows="${1}" <frameset rows="${1}"
${2} ${2:TARGET}
</frameset>${3} </frameset>${3}
snippet iframe snippet iframe
<iframe src="${1}"></iframe>${2} <iframe src="${1}"></iframe>${2}
snippet table snippet table
<table border="${1}"> <table border="${1}">
${2} ${2:TARGET}
</table>${3} </table>${3}
snippet th snippet th
<th>${1}</th>${2} <th>${1:TARGET}</th>${2}
snippet ulsquare snippet ulsquare
<ul type="square">${1}</ul>${2} <ul type="square">${1:TARGET}</ul>${2}
snippet ulcircle snippet ulcircle
<ul type="circle">${1}</ul>${2} <ul type="circle">${1:TARGET}</ul>${2}
snippet uldisc snippet uldisc
<ul type="disc">${1}</ul>${2} <ul type="disc">${1:TARGET}</ul>${2}
snippet ol snippet ol
<ol>${1}</ol>${2} <ol>${1:TARGET}</ol>${2}
snippet olA snippet olA
<ol type="A">${1}</ol>${2} <ol type="A">${1:TARGET}</ol>${2}
snippet ola snippet ola
<ol type="a">${1}</ol>${2} <ol type="a">${1:TARGET}</ol>${2}
snippet olI snippet olI
<ol type="I">${1}</ol>${2} <ol type="I">${1:TARGET}</ol>${2}
snippet oli snippet oli
<ol type="i">${1}</ol>${2} <ol type="i">${1:TARGET}</ol>${2}
snippet li snippet li
<li>${1}</li>${2} <li>${1:TARGET}</li>${2}
snippet dl snippet dl
<dl>${1}</dl>${2} <dl>${1:TARGET}</dl>${2}
snippet dt snippet dt
<dt>${1}</dt>${2} <dt>${1:TARGET}</dt>${2}
snippet dd snippet dd
<dd>${1}</dd>${2} <dd>${1:TARGET}</dd>${2}
snippet form snippet form
<form> <form>
${1} ${1:TARGET}
</form>${2} </form>${2}
snippet inputtext snippet inputtext
@ -182,33 +183,33 @@ snippet inputcheckbox
snippet textarea snippet textarea
<textarea rows="${1}" cols="${2}"> <textarea rows="${1}" cols="${2}">
${3} ${3:TARGET}
</textarea> </textarea>
${4} ${4}
snippet button snippet button
<button>${1}</button>${2} <button>${1:TARGET}</button>${2}
snippet select snippet select
<select>${1}</select>${2} <select>${1:TARGET}</select>${2}
snippet optgroup snippet optgroup
<optgroup label="${1}"> <optgroup label="${1}">
${2} ${2:TARGET}
<optgroup>${3} <optgroup>${3}
snippet option snippet option
<option value="${1}">${2}</option>${3} <option value="${1}">${2:TARGET}</option>${3}
snippet label snippet label
<label>${1}: <input type="${2}" /><label>${3} <label>${1}: <input type="${2:TARGET}" /><label>${3}
snippet labelfor snippet labelfor
<label for="${1}:id">${2}</label>${3} <label for="${1}:id">${2:TARGET}</label>${3}
snippet fiedset snippet fiedset
<fiedlset>${1}</fiedset>${2} <fiedlset>${1:TARGET}</fiedset>${2}
snippet legend snippet legend
<legend>${1}</legend>${2} <legend>${1:TARGET}</legend>${2}
snippet id snippet id
id="${1}"${2} id="${1}"${2}
@ -217,19 +218,20 @@ snippet class
class="${1}"${2} class="${1}"${2}
snippet pclass snippet pclass
<p class="${1}">${2}</p>${3} <p class="${1}">${2:TARGET}</p>${3}
snippet pid snippet pid
<p id="${1}">${2}</p>${3} <p id="${1}">${2:TARGET}</p>${3}
snippet divid snippet divid
<div id="${1}">${2}</div>${3} <div id="${1}">${2:TARGET}</div>${3}
snippet divclass snippet divclass
<div class="${1}">${2}</div>${3} <div class="${1}">${2:TARGET}</div>${3}
snippet img snippet img
<img src="${1}">${2} <img src="${1}">${2}
snippet div snippet div
<div ${1:id="${2:someid\}"}>${3}</div>${4} <div ${1:id="${2:someid\}"}>${3:TARGET}</div>${4}

View File

@ -532,6 +532,7 @@ CHANGELOG *neosnippet-changelog*
- Added FAQ section. - Added FAQ section.
- Added indent option. - Added indent option.
- Added <Plug>(neosnippet_register_oneshot_snippet). - Added <Plug>(neosnippet_register_oneshot_snippet).
- Refactored snippets files.
2012-10-29 2012-10-29
- Improved parse of snippets file. - Improved parse of snippets file.