UltiSnips/PySnippets/all.snippets

15 lines
405 B
Plaintext

# This is a comment, don't read it
snippet hallo "This is my cool description"
Hallo Welt
endsnippet
snippet class
class ${1:MyClass}(${2:object}):
def __init__( self${4/([^,])?(.*)/(?1:, )/}${4:arg} ):
"""
TODO: Fill me in
"""
${2/object$|(.+)/(?1:\t\t$0.__init__\(self\)\n\n)/}${4/(\A\s*,\s*\Z)|,?\s*([A-Za-z_][A-Za-z0-9_]*)\s*(=[^,]*)?(,\s*|$)/(?2:\t\tself._$2 = $2\n)/g} $0
endsnippet