Install yasnippet and vala-snippets packages
This commit is contained in:
10
elpa/yasnippet-20160924.2001/snippets/go-mode/benchmark
Normal file
10
elpa/yasnippet-20160924.2001/snippets/go-mode/benchmark
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: benchmark
|
||||
# key: bench
|
||||
# contributor : @atotto
|
||||
# --
|
||||
func Benchmark$1(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
$0
|
||||
}
|
||||
}
|
6
elpa/yasnippet-20160924.2001/snippets/go-mode/const
Normal file
6
elpa/yasnippet-20160924.2001/snippets/go-mode/const
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- mode:snippet -*-
|
||||
# name: const
|
||||
# key: const
|
||||
# --
|
||||
const ${1:name type} = ${2:val}
|
||||
$0
|
7
elpa/yasnippet-20160924.2001/snippets/go-mode/const(
Normal file
7
elpa/yasnippet-20160924.2001/snippets/go-mode/const(
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode:snippet -*-
|
||||
# name: const (...)
|
||||
# key: const
|
||||
# --
|
||||
const (
|
||||
${1:name type} = ${2:val}
|
||||
)
|
6
elpa/yasnippet-20160924.2001/snippets/go-mode/dd
Normal file
6
elpa/yasnippet-20160924.2001/snippets/go-mode/dd
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: debug fmt.Printf
|
||||
# key: dd
|
||||
# --
|
||||
fmt.Printf("%+v\n", $1) // output for debug
|
||||
$0
|
6
elpa/yasnippet-20160924.2001/snippets/go-mode/default
Normal file
6
elpa/yasnippet-20160924.2001/snippets/go-mode/default
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: default
|
||||
# key: def
|
||||
# --
|
||||
default:
|
||||
$0
|
7
elpa/yasnippet-20160924.2001/snippets/go-mode/else
Normal file
7
elpa/yasnippet-20160924.2001/snippets/go-mode/else
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: else
|
||||
# key: el
|
||||
# --
|
||||
else {
|
||||
$0
|
||||
}
|
8
elpa/yasnippet-20160924.2001/snippets/go-mode/error
Normal file
8
elpa/yasnippet-20160924.2001/snippets/go-mode/error
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: error
|
||||
# key: err
|
||||
# contributor : @atotto
|
||||
# --
|
||||
if err != nil {
|
||||
$0
|
||||
}
|
8
elpa/yasnippet-20160924.2001/snippets/go-mode/example
Normal file
8
elpa/yasnippet-20160924.2001/snippets/go-mode/example
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: example
|
||||
# key: example
|
||||
# contributor : @atotto
|
||||
# --
|
||||
func Example$1() {
|
||||
$0
|
||||
}
|
7
elpa/yasnippet-20160924.2001/snippets/go-mode/for
Normal file
7
elpa/yasnippet-20160924.2001/snippets/go-mode/for
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode:snippet -*-
|
||||
# name: for
|
||||
# key: for
|
||||
# --
|
||||
for $1 {
|
||||
$0
|
||||
}
|
8
elpa/yasnippet-20160924.2001/snippets/go-mode/forrange
Normal file
8
elpa/yasnippet-20160924.2001/snippets/go-mode/forrange
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: for range
|
||||
# key: range
|
||||
# contributor : @atotto
|
||||
# --
|
||||
for ${3:key}, ${2:value} := range ${1:target} {
|
||||
$0
|
||||
}
|
8
elpa/yasnippet-20160924.2001/snippets/go-mode/func
Normal file
8
elpa/yasnippet-20160924.2001/snippets/go-mode/func
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: func
|
||||
# key: func
|
||||
# --
|
||||
// $1 ${4:...}
|
||||
func ${1:name}(${2:args}) $3 {
|
||||
$0
|
||||
}
|
7
elpa/yasnippet-20160924.2001/snippets/go-mode/if
Normal file
7
elpa/yasnippet-20160924.2001/snippets/go-mode/if
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: if
|
||||
# key: if
|
||||
# --
|
||||
if $1 {
|
||||
$0
|
||||
}
|
7
elpa/yasnippet-20160924.2001/snippets/go-mode/iferr
Normal file
7
elpa/yasnippet-20160924.2001/snippets/go-mode/iferr
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: if error
|
||||
# key: iferr
|
||||
# --
|
||||
if err != $1 {
|
||||
$0
|
||||
}
|
6
elpa/yasnippet-20160924.2001/snippets/go-mode/import
Normal file
6
elpa/yasnippet-20160924.2001/snippets/go-mode/import
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- mode:snippet -*-
|
||||
# name: import
|
||||
# key: imp
|
||||
# --
|
||||
import "$1"
|
||||
$0
|
7
elpa/yasnippet-20160924.2001/snippets/go-mode/import(
Normal file
7
elpa/yasnippet-20160924.2001/snippets/go-mode/import(
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode:snippet -*-
|
||||
# name: import (...)
|
||||
# key: imp
|
||||
# --
|
||||
import (
|
||||
"$0"
|
||||
)
|
7
elpa/yasnippet-20160924.2001/snippets/go-mode/lambda
Normal file
7
elpa/yasnippet-20160924.2001/snippets/go-mode/lambda
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: lambda func
|
||||
# key: lambda
|
||||
# --
|
||||
func(${1:args}) $2 {
|
||||
$0
|
||||
}()
|
7
elpa/yasnippet-20160924.2001/snippets/go-mode/main
Normal file
7
elpa/yasnippet-20160924.2001/snippets/go-mode/main
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: func main()
|
||||
# key: main
|
||||
# --
|
||||
func main() {
|
||||
$0
|
||||
}
|
5
elpa/yasnippet-20160924.2001/snippets/go-mode/map
Normal file
5
elpa/yasnippet-20160924.2001/snippets/go-mode/map
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: map
|
||||
# key: map
|
||||
# --
|
||||
map[${1:type}]${2:type}
|
@@ -0,0 +1,12 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: parallel_benchmark
|
||||
# key: parbench
|
||||
# contributor : @kostya-sh
|
||||
# --
|
||||
func Benchmark$1(b *testing.B) {
|
||||
b.RunParallel(func(pb *testing.PB) {
|
||||
for pb.Next() {
|
||||
$0
|
||||
}
|
||||
})
|
||||
}
|
6
elpa/yasnippet-20160924.2001/snippets/go-mode/printf
Normal file
6
elpa/yasnippet-20160924.2001/snippets/go-mode/printf
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: fmt.Printf(...)
|
||||
# key: pr
|
||||
# --
|
||||
fmt.Printf("${1:%s}\n", ${2:args})
|
||||
$0
|
8
elpa/yasnippet-20160924.2001/snippets/go-mode/select
Normal file
8
elpa/yasnippet-20160924.2001/snippets/go-mode/select
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: select
|
||||
# key: sel
|
||||
# --
|
||||
select {
|
||||
case $1:
|
||||
$0
|
||||
}
|
8
elpa/yasnippet-20160924.2001/snippets/go-mode/switch
Normal file
8
elpa/yasnippet-20160924.2001/snippets/go-mode/switch
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: switch
|
||||
# key: sw
|
||||
# --
|
||||
switch $1 {
|
||||
case $2:
|
||||
$0
|
||||
}
|
8
elpa/yasnippet-20160924.2001/snippets/go-mode/test
Normal file
8
elpa/yasnippet-20160924.2001/snippets/go-mode/test
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: test
|
||||
# key: at
|
||||
# contributor : @atotto
|
||||
# --
|
||||
func Test$1(t *testing.T) {
|
||||
$0
|
||||
}
|
21
elpa/yasnippet-20160924.2001/snippets/go-mode/testmain
Normal file
21
elpa/yasnippet-20160924.2001/snippets/go-mode/testmain
Normal file
@@ -0,0 +1,21 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: testmain
|
||||
# key: testmain
|
||||
# contributor : @atotto
|
||||
# --
|
||||
func TestMain(m *testing.M) {
|
||||
setup()
|
||||
ret := m.Run()
|
||||
if ret == 0 {
|
||||
teardown()
|
||||
}
|
||||
os.Exit(ret)
|
||||
}
|
||||
|
||||
func setup() {
|
||||
$1
|
||||
}
|
||||
|
||||
func teardown() {
|
||||
$2
|
||||
}
|
7
elpa/yasnippet-20160924.2001/snippets/go-mode/type
Normal file
7
elpa/yasnippet-20160924.2001/snippets/go-mode/type
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: type
|
||||
# key: type
|
||||
# --
|
||||
type $1 $2 {
|
||||
$0
|
||||
}
|
6
elpa/yasnippet-20160924.2001/snippets/go-mode/var
Normal file
6
elpa/yasnippet-20160924.2001/snippets/go-mode/var
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: var
|
||||
# key: var
|
||||
# --
|
||||
var ${1:name} ${2:type}
|
||||
$0
|
7
elpa/yasnippet-20160924.2001/snippets/go-mode/var(
Normal file
7
elpa/yasnippet-20160924.2001/snippets/go-mode/var(
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: var (...)
|
||||
# key: var
|
||||
# --
|
||||
var (
|
||||
${1:name} ${2:type}
|
||||
)
|
Reference in New Issue
Block a user