Last active
December 19, 2015 19:49
-
-
Save yann2192/6009104 to your computer and use it in GitHub Desktop.
.vim/snippets/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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