TODO snippets + nutzlose snippets gelöscht

This commit is contained in:
madmaurice 2015-10-06 13:49:12 +02:00
parent 1c34791149
commit 082577b57e
18 changed files with 30 additions and 396 deletions

View file

@ -1,66 +0,0 @@
snippet if
If ${1:condition} Then
${2:; True code}
EndIf
snippet el
Else
${1}
snippet elif
ElseIf ${1:condition} Then
${2:; True code}
# If/Else block
snippet ifel
If ${1:condition} Then
${2:; True code}
Else
${3:; Else code}
EndIf
# If/ElseIf/Else block
snippet ifelif
If ${1:condition 1} Then
${2:; True code}
ElseIf ${3:condition 2} Then
${4:; True code}
Else
${5:; Else code}
EndIf
# Switch block
snippet switch
Switch (${1:condition})
Case {$2:case1}:
{$3:; Case 1 code}
Case Else:
{$4:; Else code}
EndSwitch
# Select block
snippet select
Select (${1:condition})
Case {$2:case1}:
{$3:; Case 1 code}
Case Else:
{$4:; Else code}
EndSelect
# While loop
snippet while
While (${1:condition})
${2:; code...}
WEnd
# For loop
snippet for
For ${1:n} = ${3:1} to ${2:count}
${4:; code...}
Next
# New Function
snippet func
Func ${1:fname}(${2:`indent('.') ? 'self' : ''`}):
${4:Return}
EndFunc
# Message box
snippet msg
MsgBox(${3:MsgType}, ${1:"Title"}, ${2:"Message Text"})
# Debug Message
snippet debug
MsgBox(0, "Debug", ${1:"Debug Message"})
# Show Variable Debug Message
snippet showvar
MsgBox(0, "${1:VarName}", $1)

View file

@ -108,3 +108,6 @@ snippet .
[${1}]${2} [${1}]${2}
snippet un snippet un
unsigned unsigned
snippet todo
// TODO: $1

View file

@ -28,3 +28,5 @@ snippet cl
private: private:
${3:/* data */} ${3:/* data */}
}; };
snippet todo
// TODO: $1

View file

@ -10,3 +10,5 @@ snippet _
${1:element} { ${1:element} {
${2} ${2}
} }
snippet todo
/* TODO: $1 */

View file

@ -188,3 +188,5 @@ snippet table
</table>${4} </table>${4}
snippet textarea snippet textarea
<textarea name="${1:Name}" rows="${2:8}" cols="${3:40}">${4}</textarea>${5} <textarea name="${1:Name}" rows="${2:8}" cols="${3:40}">${4}</textarea>${5}
snippet todo
<!-- TODO: $1 -->

View file

@ -76,3 +76,5 @@ snippet cos
static public final String ${1:var} = "${2}";${3} static public final String ${1:var} = "${2}";${3}
snippet as snippet as
assert ${1:test} : "${2:Failure message}";${3} assert ${1:test} : "${2:Failure message}";${3}
snippet todo
// TODO: $1

View file

@ -72,3 +72,6 @@ snippet get
# Get Element # Get Element
snippet gett snippet gett
getElementBy${1:Id}('${2}')${3} getElementBy${1:Id}('${2}')${3}
snippet todo
// TODO: $1

View file

@ -1,54 +0,0 @@
snippet def
<%def name="${1:name}">
${2:}
</%def>
snippet call
<%call expr="${1:name}">
${2:}
</%call>
snippet doc
<%doc>
${1:}
</%doc>
snippet text
<%text>
${1:}
</%text>
snippet for
% for ${1:i} in ${2:iter}:
${3:}
% endfor
snippet if if
% if ${1:condition}:
${2:}
% endif
snippet if if/else
% if ${1:condition}:
${2:}
% else:
${3:}
% endif
snippet try
% try:
${1:}
% except${2:}:
${3:pass}
% endtry
snippet wh
% while ${1:}:
${2:}
% endwhile
snippet $
${ ${1:} }
snippet <%
<% ${1:} %>
snippet <!%
<!% ${1:} %>
snippet inherit
<%inherit file="${1:filename}" />
snippet include
<%include file="${1:filename}" />
snippet namespace
<%namespace file="${1:name}" />
snippet page
<%page args="${1:}" />

View file

@ -1,184 +0,0 @@
# #import <...>
snippet Imp
#import <${1:Cocoa/Cocoa.h}>${2}
# #import "..."
snippet imp
#import "${1:`Filename()`.h}"${2}
# @selector(...)
snippet sel
@selector(${1:method}:)${3}
# @"..." string
snippet s
@"${1}"${2}
# Object
snippet o
${1:NSObject} *${2:foo} = [${3:$1 alloc}]${4};${5}
# NSLog(...)
snippet log
NSLog(@"${1:%@}"${2});${3}
# Class
snippet objc
@interface ${1:`Filename('', 'someClass')`} : ${2:NSObject}
{
}
@end
@implementation $1
${3}
@end
# Class Interface
snippet int
@interface ${1:`Filename('', 'someClass')`} : ${2:NSObject}
{${3}
}
${4}
@end
# Class Implementation
snippet impl
@implementation ${1:`Filename('', 'someClass')`}
${2}
@end
snippet init
- (id)init
{
[super init];
return self;
}
snippet ifself
if (self = [super init]) {
${1:/* code */}
}
return self;
snippet ibo
IBOutlet ${1:NSSomeClass} *${2:$1};${3}
# Category
snippet cat
@interface ${1:NSObject} (${2:Category})
@end
@implementation $1 ($2)
${3}
@end
# Category Interface
snippet cath
@interface ${1:NSObject} (${2:Category})
${3}
@end
# NSArray
snippet array
NSMutableArray *${1:array} = [NSMutable array];${2}
# NSDictionary
snippet dict
NSMutableDictionary *${1:dict} = [NSMutableDictionary dictionary];${2}
# NSBezierPath
snippet bez
NSBezierPath *${1:path} = [NSBezierPath bezierPath];${2}
# Method
snippet m
- (${1:id})${2:method}
{
${3}
}
# Method declaration
snippet md
- (${1:id})${2:method};${3}
# IBAction declaration
snippet ibad
- (IBAction)${1:method}:(${2:id})sender;${3}
# IBAction method
snippet iba
- (IBAction)${1:method}:(${2:id})sender
{
${3}
}
# awakeFromNib method
snippet wake
- (void)awakeFromNib
{
${1}
}
# Class Method
snippet M
+ (${1:id})${2:method}
{${3}
return nil;
}
# Sub-method (Call super)
snippet sm
- (${1:id})${2:method}
{
[super $2];${3}
return self;
}
# Method: Initialize
snippet I
+ (void) initialize
{
[[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWIthObjectsAndKeys:
${1}@"value", @"key",
nil]];
}
# Accessor Methods For:
# Object
snippet objacc
- (${1:id})${2:thing}
{
return $2;
}
- (void)set$2:($1)${3:new$2}
{
[$3 retain];
[$2 release];
$2 = $3;
}${4}
# for (object in array)
snippet forin
for (${1:Class} *${2:some$1} in ${3:array}) {
${4}
}
snippet forarray
unsigned int ${1:object}Count = [${2:array} count];
for (unsigned int index = 0; index < $1Count; index++) {
${3:id} $1 = [$2 $1AtIndex:index];
${4}
}
# IBOutlet
# @property (Objective-C 2.0)
snippet prop
@property (${1:retain}) ${2:NSSomeClass} ${3:*$2};${4}
# @synthesize (Objective-C 2.0)
snippet syn
@synthesize ${1:property};${2}
# [[ alloc] init]
snippet alloc
[[${1:foo} alloc] init${2}];${3}
# retain
snippet ret
[${1:foo} retain];${2}
# release
snippet rel
[${1:foo} release];
${2:$1 = nil;}
# autorelease
snippet arel
[${1:foo} autorelease];
# autorelease pool
snippet pool
NSAutoreleasePool *${1:pool} = [[NSAutoreleasePool alloc] init];
${2:/* code */}
[$1 drain];
# Throw an exception
snippet except
NSException *${1:badness};
$1 = [NSException exceptionWithName:@"${2:$1Name}"
reason:@"${3}"
userInfo:nil];
[$1 raise];
snippet prag
#pragma mark ${1:foo}
snippet cl
@class ${1:Foo};${2}
snippet color
[[NSColor ${1:blackColor}] set];

View file

@ -89,3 +89,5 @@ snippet cl
snippet slurp snippet slurp
my $${1:var}; my $${1:var};
{ local $/ = undef; local *FILE; open FILE, "<${2:file}"; $$1 = <FILE>; close FILE }${3} { local $/ = undef; local *FILE; open FILE, "<${2:file}"; $$1 = <FILE>; close FILE }${3}
snippet todo
# TODO: $1

View file

@ -214,3 +214,6 @@ snippet fun
# $... = array (...) # $... = array (...)
snippet array snippet array
$${1:arrayName} = array('${2}' => ${3});${4} $${1:arrayName} = array('${2}' => ${3});${4}
snippet todo
// TODO: $1

View file

@ -87,3 +87,5 @@ snippet ifmain
# __magic__ # __magic__
snippet _ snippet _
__${1:init}__${2} __${1:init}__${2}
snippet todo
# TODO: $1

View file

@ -418,3 +418,5 @@ snippet tas
task :${2:task_name => [:dependent, :tasks]} do task :${2:task_name => [:dependent, :tasks]} do
${3} ${3}
end end
snippet todo
# TODO: $1

View file

@ -30,3 +30,5 @@ snippet func
${1:function}() { ${1:function}() {
${2} ${2}
} }
snippet todo
# TODO: $1

View file

@ -5,3 +5,4 @@ snippet snip
snippet msnip snippet msnip
snippet ${1:trigger} ${2:description} snippet ${1:trigger} ${2:description}
${3} ${3}

View file

@ -1,92 +0,0 @@
# #!/usr/bin/tclsh
snippet #!
#!/usr/bin/tclsh
# Process
snippet pro
proc ${1:function_name} {${2:args}} {
${3:#body ...}
}
#xif
snippet xif
${1:expr}? ${2:true} : ${3:false}
# Conditional
snippet if
if {${1}} {
${2:# body...}
}
# Conditional if..else
snippet ife
if {${1}} {
${2:# body...}
} else {
${3:# else...}
}
# Conditional if..elsif..else
snippet ifee
if {${1}} {
${2:# body...}
} elseif {${3}} {
${4:# elsif...}
} else {
${5:# else...}
}
# If catch then
snippet ifc
if { [catch {${1:#do something...}} ${2:err}] } {
${3:# handle failure...}
}
# Catch
snippet catch
catch {${1}} ${2:err} ${3:options}
# While Loop
snippet wh
while {${1}} {
${2:# body...}
}
# For Loop
snippet for
for {set ${2:var} 0} {$$2 < ${1:count}} {${3:incr} $2} {
${4:# body...}
}
# Foreach Loop
snippet fore
foreach ${1:x} {${2:#list}} {
${3:# body...}
}
# after ms script...
snippet af
after ${1:ms} ${2:#do something}
# after cancel id
snippet afc
after cancel ${1:id or script}
# after idle
snippet afi
after idle ${1:script}
# after info id
snippet afin
after info ${1:id}
# Expr
snippet exp
expr {${1:#expression here}}
# Switch
snippet sw
switch ${1:var} {
${3:pattern 1} {
${4:#do something}
}
default {
${2:#do something}
}
}
# Case
snippet ca
${1:pattern} {
${2:#do something}
}${3}
# Namespace eval
snippet ns
namespace eval ${1:path} {${2:#script...}}
# Namespace current
snippet nsc
namespace current

View file

@ -30,3 +30,5 @@ snippet ife
else else
${3} ${3}
endif endif
snippet todo
# TODO: $1

View file

@ -56,3 +56,5 @@ snippet fun
function ${1:name} (${2:args}) { function ${1:name} (${2:args}) {
${3:# body} ${3:# body}
} }
snippet todo
# TODO: $1