This commit is contained in:
Andrea Crotti 2010-08-12 12:13:13 +02:00
commit 8ca3930928
212 changed files with 1454 additions and 0 deletions

View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: project
# key: proj
# --
<project name="${1:test}" default="${2:compile}" basedir="${3:.}">
$0
</project>

View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: property
# key: prop
# --
<property name="${1:name}" value="${2:value}" />
$0

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: target
# key: target
# --
<target name="${1:compile}" ${2:other}>
$0
</target>

View File

@ -0,0 +1 @@
text-mode

View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: bang
# key: !
# --
#!/usr/bin/osascript

9
box.yasnippet Normal file
View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# expand-env: ((comment-char (if comment-start comment-start ?\#)))
# name: box
# key: box
# --
${1:$(make-string (+ 4 (string-width text)) ?\#)}
# ${1:text}
${1:$(make-string (+ 4 (string-width text)) ?\#)}
$0

7
c-mode/apple.yasnippet Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: apple
# key: apple
# --
#ifdef __APPLE__
$0
#endif

5
c-mode/compile.yasnippet Normal file
View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: compile
# key: compile
# --
// -*- compile-command: "${1:gcc -Wall -o ${2:dest} ${3:file}}" -*-

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: configuration
# key: conf
# --
configuration {
$0
}

7
c-mode/do.yasnippet Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: do
# key: do
# --
do {
$0
} while (${1:condition});

8
c-mode/event.yasnippet Normal file
View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: event
# key: event
# --
event void ${1:Boot.booted()
{
$0
}

7
c-mode/for.yasnippet Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: for
# key: for
# --
for (${1:i = 0}; ${2:i < N}; ${3:i++}) {
$0
}

10
c-mode/guard Normal file
View File

@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# name: guard
# key: guard
# --
#ifndef ${1:NAME}_H
#define $1_H
$0
#endif

5
c-mode/here Normal file
View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: here
# key: here
# --
printf("here\n");

5
c-mode/include Normal file
View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: include
# key: #
# --
#include $0

7
c-mode/inf.yasnippet Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: inf
# key: inf
# --
for (;;) {
$0
}

6
c-mode/link.yasnippet Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: link
# key: ->
# --
${1:Module} -> ${2:Component};
$0

6
c-mode/malloc.yasnippet Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: malloc
# key: malloc
# --
malloc(sizeof($1)${2: * ${3:3}});
$0

6
c-mode/math.yasnippet Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: math
# key: math
# --
#include <math.h>
$0

8
c-mode/module.yasnippet Normal file
View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: module
# key: mod
# --
module ${1:Mod} @safe()
{
$0
}

5
c-mode/packed Normal file
View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: packed
# key: packed
# --
__attribute__((__packed__))$0

5
c-mode/packed.yasnippet Normal file
View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: packed
# key: packed
# --
__attribute__((__packed__))

6
c-mode/printf.yasnippet Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: printf
# key: pr
# --
printf("${1:format string}"${2: ,a0,a1});
$0

11
c-mode/standalone Normal file
View File

@ -0,0 +1,11 @@
# -*- mode: snippet -*-
# name: standalone
# key: standalone
# --
#ifdef STANDALONE
int main(int argc, char *argv[]) {
$0
}
#endif

6
c-mode/stdio.yasnippet Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: stdio
# key: io
# --
#include <stdio.h>
$0

5
c-mode/stdlib.yasnippet Normal file
View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: stdlib
# key: std
# --
#include <stdlib.h>

5
c-mode/string Normal file
View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: string
# key: str
# --
#include <string.h>

5
c-mode/struct Normal file
View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: struct
# key: {
# --
{.${1:field} = ${2:value}$0};

11
c-mode/switch.yasnippet Normal file
View File

@ -0,0 +1,11 @@
# -*- mode: snippet -*-
# name: switch
# key: case
# --
switch (${1:ch}) {
case ${2:const}:
${3:a = b};
break;
${4:default:
${5:action}}
}

5
c-mode/ternary Normal file
View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: ternary
# key: ?
# --
(${1:cond}) ? ${2:then} : ${3:else};

8
c-mode/test Normal file
View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: test
# key: test
# --
START_TEST (${1:test_name}) {
$0
}
END_TEST

5
c-mode/typedef.yasnippet Normal file
View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: typedef
# key: typedef
# --
typedef ${1:type} ${2:alias};

7
c-mode/union.yasnippet Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: union
# key: union
# --
typedef union {
$0
} ${1:name};

6
c-mode/unistd.yasnippet Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: unistd
# key: uni
# --
#include <unistd.h>
$0

7
c-mode/while.yasnippet Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: while
# key: while
# --
while (${1:condition}) {
$0
}

5
emacs-lisp-mode/hash Normal file
View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: hash
# key: hash
# --
make-hash-table ${1:options}

12
f2py.yasnippet Normal file
View File

@ -0,0 +1,12 @@
# -*- mode: snippet -*-
# name: f2py
# key: f2py
# --
python module ${1:m}
interface
subroutine ${2:foo(x,y)}
$0
end subroutine ${2:$(substring text 0 (string-match "(" text))}
end interface
end python module $1

1
go-mode/.yas-parents Normal file
View File

@ -0,0 +1 @@
text-mode

7
go-mode/func.yasnippet Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: func
# key: func
# --
func ${1:fun}(${2:args}) {
$0
}

6
go-mode/import.yasnippet Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: import
# key: imp
# --
import ${1:package}
$0

8
go-mode/main.yasnippet Normal file
View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: main
# key: main
# --
func main() {
${1:fmt.Printf("Hello, 世界\n")}
$0
}

8
go-mode/map.yasnippet Normal file
View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: map
# key: map
# --
map[${1:string}] ${2:int} {
${3:"X": 100,}
$0
}

6
go-mode/printf.yasnippet Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: printf
# key: pr
# --
fmt.Printf("${1:fmt}\n"${2:,str})
$0

8
go-mode/switch.yasnippet Normal file
View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: switch
# key: switch
# --
switch {
case ${1:cond}:
$0
}

6
go-mode/var.yasnippet Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: var
# key: var
# --
var ${1:ok} ${2:bool}
$0

1
groovy-mode/.yas-parents Normal file
View File

@ -0,0 +1 @@
text-mode java-mode

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: class
# key: class
# --
class ${1:Class} {
$0
}

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: def
# key: def
# --
def ${1:method}(${2:args}) {
$0
}

View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: dict
# key: dict
# --
${1:dict} = [${2:key} : ${3:value}$0]

View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: for
# key: for
# --
for (${1:var} in ${2:iter}) {
$0
}

View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: println
# key: pr
# --
println ${1:"string"}
$0

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: times
# key: times
# --
${1:10}.times {
$0
} .

View File

@ -0,0 +1 @@
text-mode

View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: case
# key: case
# --
case ${1:var} of
${2:cond} -> ${3:value}
$0
otherwise -> ${4:other}

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: doc
# key: doc
# --
{-
$0
-}

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: fun
# key: fun
# contributor: Andrea Crotti
# --
${1:function-name} :: ${2:type}
$1 ${3:arguments} $0

5
haskell-mode/import Normal file
View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: import
# key: import
# --
import${1: qualified} ${2:Module${3:(symbols)}}${4: as ${5:alias}}

View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: instance
# key: instance
# --
instance ${1:${2:(Show a)} => }${3:Ord} ${4:DataType} where
$0

5
haskell-mode/main Normal file
View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: main
# key: main
# --
main = do $0

View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: module
# key: mod
# --
module ${1:Module} where
$0

View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: new class
# key: class
# --
class ${1:Class Name} where
$0

5
haskell-mode/pragma Normal file
View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: pragma
# key: {
# --
{-# ${1:PRAGMA} #-}

View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: print
# key: pr
# --
print $0

1
java-mode/.yas-parents Normal file
View File

@ -0,0 +1 @@
text-mode

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: apr_assert
# key: apr_assert
# --
if (Globals.useAssertions) {
${1:assert ..};
}

View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: author
# key: author
# --
@author Andrea Crotti, Marius Grysla, Oscar Dustmann

9
java-mode/cls.yasnippet Normal file
View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: cls
# key: cls
# --
${1:public }class ${2:Class}$3 {
${4:public $2($5) {
$0
}}
}

7
java-mode/doc.yasnippet Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: doc
# key: /*
# --
/**
* ${1:documentation}
*/

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: equals
# key: eq
# --
public boolean equals(${1:Class} other) {
$0
}

View File

@ -0,0 +1,11 @@
# -*- mode: snippet -*-
# name: file_class
# key: file
# --
public class ${1:`(let ((fn (file-name-nondirectory
(file-name-sans-extension
(or (buffer-file-name)
(buffer-name (current-buffer))))))))}
$0
end

7
java-mode/for.yasnippet Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: for
# key: for
# --
for (${1:int i = 0}; ${2:i < N}; ${3:i++}) {
$0
}

7
java-mode/fori.yasnippet Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: fori
# key: fori
# --
for (${1:Type el} : ${2:iterator}) {
$0
}

7
java-mode/if.yasnippet Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: if
# key: if
# --
if (${1:condition}) {
$0
}

10
java-mode/ife.yasnippet Normal file
View File

@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# name: ife
# key: ife
# --
if (${1:cond}) {
$2
}
else {
$3
}

View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: import
# key: imp
# --
import ${1:System.};
$0

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: iterator
# key: iterator
# --
public Iterator<${1:type}> iterator() {
$0
}

7
java-mode/main.yasnippet Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: main
# key: main
# --
public static void main(String[] args) {
$0
}

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: method
# key: method
# --
${1:public }${2:void} ${3:name} (${4:args}) {
$0
}

View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: param
# key: param
# --
@param ${1:paramater} $0

View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: printf
# key: printf
# --
System.out.printf("$0%n");

View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: println
# key: pr
# --
System.out.println(${1:"text"});

View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: return
# key: ret
# --
@return ${1:description}

8
java-mode/test.yasnippet Normal file
View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: test
# key: test
# --
@Test
public void test_${1:Case}() {
$0
}

View File

@ -0,0 +1,12 @@
# -*- mode: snippet -*-
# name: testClass
# key: tc
# --
import junit.framework.*;
import junit.textui.*;
public class Test${1:Class} extends TestCase {
protected void setUp() {
$0
}
}

5
java-mode/this.yasnippet Normal file
View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: this
# key: .
# --
this.$0

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: toString
# key: toStr
# --
public String toString() {
$0
}

11
java-mode/try.yasnippet Normal file
View File

@ -0,0 +1,11 @@
# -*- mode: snippet -*-
# name: try
# key: try
# --
try {
$0
}
catch (${1:Throwable e}) {
${2:System.out.println("Error " + e.getMessage());
e.printStackTrace();}
}

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: apr_assert
# key: apr_assert
# --
if (Globals.useAssertions) {
${1:assert ..};
}

7
jde-mode/cls.yasnippet Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: cls
# key: cls
# --
class ${1:Class} {
$0
}

View File

@ -0,0 +1,11 @@
# -*- mode: snippet -*-
# name: file_class
# key: file
# --
public class ${1:`(let ((fn (file-name-nondirectory
(file-name-sans-extension
(or (buffer-file-name)
(buffer-name (current-buffer))))))))}
$0
end

7
jde-mode/for.yasnippet Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: for
# key: for
# --
for (${1:int i = 0}; ${2:i < N}; ${3:i++}) {
$0
}

8
jde-mode/fori.yasnippet Normal file
View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: fori
# key: fori
# --
for (${1:Object el} : ${2:iterator}) {
$0
}

7
jde-mode/if.yasnippet Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: if
# key: if
# --
if (${1:condition) {
$0
}

10
jde-mode/ife.yasnippet Normal file
View File

@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# name: ife
# key: ife
# --
if (${1:cond}) {
$2
}
else {
$3
}

View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: import
# key: imp
# --
import ${1:System.};
$0

View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: javadoc
# key: doc
# --
/**
* $0
*
*/

7
jde-mode/main.yasnippet Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: main
# key: main
# --
public static void main(String[] args) {
$0
}

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: method
# key: method
# --
${1:public }${2:void} ${3:name} (${4:args}) {
$0
}

6
jde-mode/new.yasnippet Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: new
# key: new
# --
${1:Type} ${2:obj} = new ${3:Constr}(${4:args});
$0

5
jde-mode/param.yasnippet Normal file
View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: param
# key: param
# --
@param ${1:paramater} $0

Some files were not shown because too many files have changed in this diff Show More