A bunch of new snippets
This commit is contained in:
parent
a3eb6846b3
commit
23b179ad1d
12 changed files with 76 additions and 0 deletions
7
snippets/js2-mode/before
Normal file
7
snippets/js2-mode/before
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: before
|
||||||
|
# key: bef
|
||||||
|
# --
|
||||||
|
before(function() {
|
||||||
|
$1
|
||||||
|
})
|
7
snippets/js2-mode/context
Normal file
7
snippets/js2-mode/context
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: context
|
||||||
|
# key: context
|
||||||
|
# --
|
||||||
|
context('$1', function() {
|
||||||
|
$2
|
||||||
|
})
|
6
snippets/js2-mode/function
Normal file
6
snippets/js2-mode/function
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# key: f
|
||||||
|
# name: function
|
||||||
|
# --
|
||||||
|
function $1($2) {
|
||||||
|
$3
|
||||||
|
}
|
6
snippets/org-mode/SQL source block
Normal file
6
snippets/org-mode/SQL source block
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# key: sql
|
||||||
|
# name: SQL source block
|
||||||
|
# --
|
||||||
|
#+BEGIN_SRC sql ${1::async}
|
||||||
|
$2
|
||||||
|
#+END_SRC
|
7
snippets/org-mode/description
Normal file
7
snippets/org-mode/description
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: description
|
||||||
|
# key: desc
|
||||||
|
# --
|
||||||
|
:DESCRIPTION:
|
||||||
|
$1
|
||||||
|
:END:
|
6
snippets/org-mode/python source block
Normal file
6
snippets/org-mode/python source block
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# key: py
|
||||||
|
# name: Python source block
|
||||||
|
# --
|
||||||
|
#+BEGIN_SRC python
|
||||||
|
$0
|
||||||
|
#+END_SRC
|
7
snippets/org-mode/transaction
Normal file
7
snippets/org-mode/transaction
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: transaction
|
||||||
|
# key: begin
|
||||||
|
# --
|
||||||
|
BEGIN;
|
||||||
|
$0
|
||||||
|
ROLLBACK;
|
5
snippets/python-mode/add_column
Normal file
5
snippets/python-mode/add_column
Normal file
|
@ -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
|
6
snippets/python-mode/op.get_bind.execute
Normal file
6
snippets/python-mode/op.get_bind.execute
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# key: exec
|
||||||
|
# name: op.get_bind.execute
|
||||||
|
# --
|
||||||
|
op.get_bind().execute("""
|
||||||
|
`(progn (sqlup-mode) "")`$1
|
||||||
|
""")
|
5
snippets/rust-mode/#[macro_use]
Normal file
5
snippets/rust-mode/#[macro_use]
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# key: macro_use
|
||||||
|
# name: #[macro_use]
|
||||||
|
# --
|
||||||
|
#[macro_use]
|
||||||
|
${1:extern crate} ${2:something};$0
|
9
snippets/rust-mode/tests
Normal file
9
snippets/rust-mode/tests
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# key: tests
|
||||||
|
# name: test module
|
||||||
|
# --
|
||||||
|
#[cfg(test)]
|
||||||
|
mod ${1:tests} {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
$0
|
||||||
|
}
|
5
snippets/sql-mode/count(*) group by
Normal file
5
snippets/sql-mode/count(*) group by
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: count(*) group by
|
||||||
|
# key: countby
|
||||||
|
# --
|
||||||
|
SELECT count(*), ${1:column} FROM ${2:table} GROUP BY $1;
|
Loading…
Add table
Reference in a new issue