First commit.

This commit is contained in:
kj
2022-03-29 19:21:13 -04:00
commit da8f068975
293 changed files with 3002 additions and 0 deletions

4
snippets/go-mode/append Normal file
View File

@ -0,0 +1,4 @@
# -*- mode: snippet -*-
# name: append
# --
${1:type} = append($1, ${2:elems})

6
snippets/go-mode/coloneq Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: ... := ...
# key: :=
# uuid: :=
# --
${1:x} := ${2:`%`}

5
snippets/go-mode/const Normal file
View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# contributor: Seong Yong-ju
# name: const ... = ...
# --
const ${1:name}${2: type} = ${3:value}$0

4
snippets/go-mode/ctxc Normal file
View File

@ -0,0 +1,4 @@
# -*- mode: snippet -*-
# name: ctx context.Context
# --
ctx context.Context

6
snippets/go-mode/f Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: func ...(...) ... { ... }
# --
func ${1:name}(${2:args})${3: return type} {
`%`$0
}

6
snippets/go-mode/fm Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: func (target) name(args) (results) { ... }
# --
func (${1:target}) ${2:name}(${3:args})${4: return type} {
$0
}

6
snippets/go-mode/for Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: for ... { ... }
# --
for $1 {
`%`$0
}

6
snippets/go-mode/fore Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: for key, value := range ... { ... }
# --
for ${1:key}, ${2:value} := range ${3:target} {
`%`$0
}

6
snippets/go-mode/foreach Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: for key, value := range ... { ... }
# --
for ${1:key}, ${2:value} := range ${3:target} {
`%`$0
}

6
snippets/go-mode/fori Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: for i := 0; i < n; i++ { ... }
# --
for ${1:i} := ${2:0}; $1 < ${3:10}; $1++ {
`%`$0
}

6
snippets/go-mode/forw Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: for ... { ... }
# --
for $1 {
`%`$0
}

6
snippets/go-mode/func Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: func ...(...) ... { ... }
# --
func ${1:name}(${2:args})${3: return type} {
`%`$0
}

4
snippets/go-mode/go Normal file
View File

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

6
snippets/go-mode/gof Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: go func
# --
go func (${1:args}) {
$0
}(${2:values})

6
snippets/go-mode/gofunc Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: go func (short)
# --
go func (${1:args}) {
$0
}(${2:values})

7
snippets/go-mode/if Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# contributor: Seong Yong-ju
# name: if ... { ... }
# --
if ${1:condition} {
`%`$0
}

9
snippets/go-mode/ife Normal file
View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# contributor: Seong Yong-ju
# name: if ... { ... } else { ... }
# --
if ${1:condition} {
`%`$2
} else {
$0
}

6
snippets/go-mode/iferr Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: if err != nil { ... }
# --
if err != nil {
`%`$0
}

4
snippets/go-mode/imp Normal file
View File

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

4
snippets/go-mode/import Normal file
View File

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

View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: type ... interface { ... }
# --
type $1 interface {
`%`$0
}

6
snippets/go-mode/main Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: func main() { ... }
# --
func main() {
$0
}

4
snippets/go-mode/map Normal file
View File

@ -0,0 +1,4 @@
# -*- mode: snippet -*-
# name: map
# --
map[${1:KeyType}]${2:ValueType}

6
snippets/go-mode/method Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: func (target) name(args) (results) { ... }
# --
func (${1:target}) ${2:name}(${3:args})${4: return type} {
$0
}

4
snippets/go-mode/package Normal file
View File

@ -0,0 +1,4 @@
# -*- mode: snippet -*-
# name: package
# --
package ${1:`(car (last (split-string (file-name-directory buffer-file-name) "/") 2))`}

4
snippets/go-mode/pkg Normal file
View File

@ -0,0 +1,4 @@
# -*- mode: snippet -*-
# name: package (short)
# --
package ${1:`(car (last (split-string (file-name-directory buffer-file-name) "/") 2))`}

4
snippets/go-mode/pr Normal file
View File

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

4
snippets/go-mode/printf Normal file
View File

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

4
snippets/go-mode/println Normal file
View File

@ -0,0 +1,4 @@
# -*- mode: snippet -*-
# name: println
# --
fmt.Println("${1:msg}")$0

4
snippets/go-mode/prln Normal file
View File

@ -0,0 +1,4 @@
# -*- mode: snippet -*-
# name: println (short)
# --
fmt.Println("${1:msg}")$0

7
snippets/go-mode/select Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: select
# --
select {
case ${1:cond}:
$0
}

6
snippets/go-mode/struct Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: type ... struct { ... }
# --
type $1 struct {
`%`$0
}

9
snippets/go-mode/switch Normal file
View File

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

6
snippets/go-mode/test Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: func Test...() { ... }
# --
func Test${1:Name}(${2:t *testing.T}) {
`%`$0
}

4
snippets/go-mode/var Normal file
View File

@ -0,0 +1,4 @@
# -*- mode: snippet -*-
# name: var
# --
var ${1:name} ${2:type} = ${3:value}$0

6
snippets/go-mode/while Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name : for ... { ... }
# --
for $1 {
`%`$0
}

4
snippets/go-mode/wr Normal file
View File

@ -0,0 +1,4 @@
# -*- mode: snippet -*-
# name: http request writer
# --
w http.ResponseWriter, r *http.Request