Added go snippets.
This commit is contained in:
parent
a45cf80e03
commit
ca5fa29574
45
autoload/neosnippet/snippets/go.snip
Normal file
45
autoload/neosnippet/snippets/go.snip
Normal file
@ -0,0 +1,45 @@
|
||||
snippet helloworld
|
||||
abbr package main\nimport fmt...
|
||||
options head
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Printf("Hello, world\n")
|
||||
}
|
||||
|
||||
snippet func
|
||||
abbr func ...() { ... }
|
||||
options head
|
||||
func ${1:fname}(${2}) ${3:int }{
|
||||
${0:TARGET:return }
|
||||
}
|
||||
|
||||
snippet import
|
||||
options head
|
||||
import (
|
||||
"${1:fmt}"
|
||||
)
|
||||
${0:TARGET}
|
||||
|
||||
snippet package
|
||||
options head
|
||||
package ${1:main}
|
||||
${0:TARGET}
|
||||
|
||||
snippet printf
|
||||
options word
|
||||
fmt.Printf("${1}\n"${2:})
|
||||
|
||||
snippet println
|
||||
options word
|
||||
fmt.Println(${0:TARGET})
|
||||
|
||||
snippet struct
|
||||
options head
|
||||
type ${1} struct {
|
||||
${0:TARGET}
|
||||
}
|
@ -784,6 +784,9 @@ A: You can use |:NeoSnippetSource| for it.
|
||||
==============================================================================
|
||||
CHANGELOG *neosnippet-changelog*
|
||||
|
||||
2013-05-18
|
||||
- Added go snippets.
|
||||
|
||||
2013-04-16
|
||||
- Improved changing foldmethod feature.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user