mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-14 05:23:04 +00:00
a new version of class snippet for python-mode
This commit is contained in:
parent
a5619b9a10
commit
77eeb41e18
@ -1,8 +1,14 @@
|
|||||||
#contributor : Orestis Markou
|
#original contributor : Orestis Markou
|
||||||
|
#contributor : Nishio Hirokazu
|
||||||
#name : class ... :
|
#name : class ... :
|
||||||
# --
|
# --
|
||||||
class ${1:cname}(${2:object}):
|
class ${1:ClassName}(${2:object}):
|
||||||
"docstring for $1"
|
"docstring for $1"
|
||||||
def __init__(self, ${3:arg}):
|
def __init__(self, ${3:args}):
|
||||||
self.$3 = $3
|
${3:$
|
||||||
$0
|
(mapconcat
|
||||||
|
'(lambda (x) (concat "self." x " = " x))
|
||||||
|
(split-string text ", ")
|
||||||
|
(concat "\n" (make-string (current-column) 32)))
|
||||||
|
}
|
||||||
|
$0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user