Skip to content

Instantly share code, notes, and snippets.

@yann2192
Last active December 19, 2015 19:49
Show Gist options
  • Save yann2192/6009104 to your computer and use it in GitHub Desktop.
Save yann2192/6009104 to your computer and use it in GitHub Desktop.
.vim/snippets/
snippet import
import (
${1}
)
snippet const
const (
${1}
)
snippet err
if err != nil {
return err${1}
}
snippet ifnull
if ${1} == nil {
return errors.New(${2})
}
snippet main
func main() {
${1}
}
snippet struct
type ${1} struct {
${2}
}
snippet //
/* ${1} */
snippet print
log.Println(${1})
snippet test
func Test${1}(t *testing.T) {
${2}
}
snippet pdb
import pdb; pdb.set_trace()
snippet main
if __name__ == "__main__":
${1}
snippet init
#!/usr/bin/env python
# -*- coding: utf-8 -*-
snippet class
class ${1:ClassName}:
def __init__(self):
${2}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment