Add custom go-mode yasnippet snippets

This commit is contained in:
2014-07-09 02:07:53 +01:00
parent ff5323e0de
commit ba9a8a2298
6 changed files with 36 additions and 0 deletions

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

@@ -0,0 +1,6 @@
# name: func
# key: func
# --
func ${1:name}($2) {
$0
}

View File

@@ -0,0 +1,6 @@
# name: interface
# key: interface
# --
type ${1:InterfaceName} interface {
$0
}

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

@@ -0,0 +1,10 @@
# name: main
# key: main
# --
package main
import "fmt"
func main() {
$0
}

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

@@ -0,0 +1,4 @@
# name: pd
# key: pd
# --
fmt.Printf($0)

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

@@ -0,0 +1,4 @@
# name: pdl
# key: pdl
# --
fmt.Println($0)

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

@@ -0,0 +1,6 @@
# name: struct
# key: struct
# --
type ${1:StructName} struct {
$0
}