From 24cd013e28736cc04d08b4416c3c748153b09688 Mon Sep 17 00:00:00 2001 From: Bao Pham Date: Thu, 12 Apr 2012 20:53:54 -0700 Subject: Add more templates for html, python, and java --- template/html/snip-css.html | 1 + template/html/snip-js.html | 1 + template/java/base-class.java | 4 ++-- template/java/snip-comment-block.java | 3 +++ template/java/snip-doc-comment.java | 3 +++ template/python/base-class.py | 7 +++++++ template/python/snip-class.py | 3 +++ template/python/snip-doc.py | 3 +++ 8 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 template/html/snip-css.html create mode 100644 template/html/snip-js.html create mode 100644 template/java/snip-comment-block.java create mode 100644 template/java/snip-doc-comment.java create mode 100644 template/python/base-class.py create mode 100644 template/python/snip-class.py create mode 100644 template/python/snip-doc.py (limited to 'template') diff --git a/template/html/snip-css.html b/template/html/snip-css.html new file mode 100644 index 0000000..06bd9c1 --- /dev/null +++ b/template/html/snip-css.html @@ -0,0 +1 @@ + diff --git a/template/html/snip-js.html b/template/html/snip-js.html new file mode 100644 index 0000000..f078964 --- /dev/null +++ b/template/html/snip-js.html @@ -0,0 +1 @@ + diff --git a/template/java/base-class.java b/template/java/base-class.java index e87b16a..f472f63 100644 --- a/template/java/base-class.java +++ b/template/java/base-class.java @@ -1,11 +1,11 @@ /** * {{_name_}} */ -public class {{_name_}} { +public class {{_expr_:substitute('{{_name_}}', '\w\+', '\u\0', '')}} { /** * Constructor */ - public {{_name_}}() { + public {{_expr_:substitute('{{_name_}}', '\w\+', '\u\0', '')}}() { {{_cursor_}} } } diff --git a/template/java/snip-comment-block.java b/template/java/snip-comment-block.java new file mode 100644 index 0000000..9b1229e --- /dev/null +++ b/template/java/snip-comment-block.java @@ -0,0 +1,3 @@ +/* + * {{_cursor_}} + */ diff --git a/template/java/snip-doc-comment.java b/template/java/snip-doc-comment.java new file mode 100644 index 0000000..5d93c0d --- /dev/null +++ b/template/java/snip-doc-comment.java @@ -0,0 +1,3 @@ +/** + * {{_cursor_}} + */ diff --git a/template/python/base-class.py b/template/python/base-class.py new file mode 100644 index 0000000..a606982 --- /dev/null +++ b/template/python/base-class.py @@ -0,0 +1,7 @@ +""" +{{_name_}} +""" + +class {{_expr_:substitute('{{_input_:name}}', '\w\+', '\u\0', '')}}: + def __init__(self): + {{_cursor_}} diff --git a/template/python/snip-class.py b/template/python/snip-class.py new file mode 100644 index 0000000..9ed48aa --- /dev/null +++ b/template/python/snip-class.py @@ -0,0 +1,3 @@ +class {{_expr_:substitute('{{_input_:name}}', '\w\+', '\u\0', '')}}: + def __init__(self): + {{_cursor_}} diff --git a/template/python/snip-doc.py b/template/python/snip-doc.py new file mode 100644 index 0000000..8612028 --- /dev/null +++ b/template/python/snip-doc.py @@ -0,0 +1,3 @@ +""" +{{_cursor_}} +""" -- cgit v1.2.3-54-g00ecf From 8e9cfb1e124b4d2329c2b671370a65ce37e0923a Mon Sep 17 00:00:00 2001 From: Bao Pham Date: Thu, 12 Apr 2012 21:01:36 -0700 Subject: Add template for html icon link tag --- template/html/snip-icon.html | 1 + 1 file changed, 1 insertion(+) create mode 100644 template/html/snip-icon.html (limited to 'template') diff --git a/template/html/snip-icon.html b/template/html/snip-icon.html new file mode 100644 index 0000000..cd1da90 --- /dev/null +++ b/template/html/snip-icon.html @@ -0,0 +1 @@ + -- cgit v1.2.3-54-g00ecf