diff options
Diffstat (limited to 'snippets')
-rw-r--r-- | snippets/js2-mode/before | 7 | ||||
-rw-r--r-- | snippets/js2-mode/context | 7 | ||||
-rw-r--r-- | snippets/js2-mode/function | 6 | ||||
-rw-r--r-- | snippets/org-mode/SQL source block | 6 | ||||
-rw-r--r-- | snippets/org-mode/description | 7 | ||||
-rw-r--r-- | snippets/org-mode/python source block | 6 | ||||
-rw-r--r-- | snippets/org-mode/transaction | 7 | ||||
-rw-r--r-- | snippets/python-mode/add_column | 5 | ||||
-rw-r--r-- | snippets/python-mode/op.get_bind.execute | 6 | ||||
-rw-r--r-- | snippets/rust-mode/#[macro_use] | 5 | ||||
-rw-r--r-- | snippets/rust-mode/tests | 9 | ||||
-rw-r--r-- | snippets/sql-mode/count(*) group by | 5 |
12 files changed, 76 insertions, 0 deletions
diff --git a/snippets/js2-mode/before b/snippets/js2-mode/before new file mode 100644 index 000000000000..4569b6583143 --- /dev/null +++ b/snippets/js2-mode/before @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: before +# key: bef +# -- +before(function() { + $1 +}) diff --git a/snippets/js2-mode/context b/snippets/js2-mode/context new file mode 100644 index 000000000000..d83809f3c35e --- /dev/null +++ b/snippets/js2-mode/context @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: context +# key: context +# -- +context('$1', function() { + $2 +}) diff --git a/snippets/js2-mode/function b/snippets/js2-mode/function new file mode 100644 index 000000000000..b423044b4410 --- /dev/null +++ b/snippets/js2-mode/function @@ -0,0 +1,6 @@ +# key: f +# name: function +# -- +function $1($2) { + $3 +} \ No newline at end of file diff --git a/snippets/org-mode/SQL source block b/snippets/org-mode/SQL source block new file mode 100644 index 000000000000..b5d43fd6bc01 --- /dev/null +++ b/snippets/org-mode/SQL source block @@ -0,0 +1,6 @@ +# key: sql +# name: SQL source block +# -- +#+BEGIN_SRC sql ${1::async} +$2 +#+END_SRC diff --git a/snippets/org-mode/description b/snippets/org-mode/description new file mode 100644 index 000000000000..a43bc95cc3ed --- /dev/null +++ b/snippets/org-mode/description @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: description +# key: desc +# -- +:DESCRIPTION: +$1 +:END: diff --git a/snippets/org-mode/python source block b/snippets/org-mode/python source block new file mode 100644 index 000000000000..247ae51b0b78 --- /dev/null +++ b/snippets/org-mode/python source block @@ -0,0 +1,6 @@ +# key: py +# name: Python source block +# -- +#+BEGIN_SRC python +$0 +#+END_SRC \ No newline at end of file diff --git a/snippets/org-mode/transaction b/snippets/org-mode/transaction new file mode 100644 index 000000000000..37f2dd31caff --- /dev/null +++ b/snippets/org-mode/transaction @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: transaction +# key: begin +# -- +BEGIN; +$0 +ROLLBACK; \ No newline at end of file diff --git a/snippets/python-mode/add_column b/snippets/python-mode/add_column new file mode 100644 index 000000000000..47e83850d5b7 --- /dev/null +++ b/snippets/python-mode/add_column @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: add_column +# key: op.add_column +# -- +op.add_column('${1:table}', sa.Column('${2:name}', sa.${3:String()}))$0 diff --git a/snippets/python-mode/op.get_bind.execute b/snippets/python-mode/op.get_bind.execute new file mode 100644 index 000000000000..5f46464ac93a --- /dev/null +++ b/snippets/python-mode/op.get_bind.execute @@ -0,0 +1,6 @@ +# key: exec +# name: op.get_bind.execute +# -- +op.get_bind().execute(""" + `(progn (sqlup-mode) "")`$1 +""") diff --git a/snippets/rust-mode/#[macro_use] b/snippets/rust-mode/#[macro_use] new file mode 100644 index 000000000000..fea942a337f6 --- /dev/null +++ b/snippets/rust-mode/#[macro_use] @@ -0,0 +1,5 @@ +# key: macro_use +# name: #[macro_use] +# -- +#[macro_use] +${1:extern crate} ${2:something};$0 diff --git a/snippets/rust-mode/tests b/snippets/rust-mode/tests new file mode 100644 index 000000000000..0a476ab58661 --- /dev/null +++ b/snippets/rust-mode/tests @@ -0,0 +1,9 @@ +# key: tests +# name: test module +# -- +#[cfg(test)] +mod ${1:tests} { + use super::*; + + $0 +} diff --git a/snippets/sql-mode/count(*) group by b/snippets/sql-mode/count(*) group by new file mode 100644 index 000000000000..6acc46ff397a --- /dev/null +++ b/snippets/sql-mode/count(*) group by @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: count(*) group by +# key: countby +# -- +SELECT count(*), ${1:column} FROM ${2:table} GROUP BY $1; |