mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-16 10:24:18 +00:00
Add explicit "# key" directive to legacy snippet collection before deprecating filenames-as-triggers
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#name : __...__
|
||||
# key: __
|
||||
# --
|
||||
__${init}__
|
||||
@@ -3,6 +3,7 @@
|
||||
# contributor: Orestis Markou
|
||||
# contributor: Nishio Hirokazu
|
||||
# contributor: Yasser González Fernández <yglez@uh.cu>
|
||||
# key: class
|
||||
# --
|
||||
class ${1:ClassName}(${2:object}):
|
||||
"""$3
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# name: def
|
||||
# contributor: Orestis Markou
|
||||
# contributor: Yasser González Fernández <yglez@uh.cu>
|
||||
# key: def
|
||||
# --
|
||||
def ${1:name}($2):
|
||||
"""$3
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# name: defm
|
||||
# contributor: Yasser Gonz¨¢lez Fern¨¢ndez <yglez@uh.cu>
|
||||
# key: defm
|
||||
# --
|
||||
def ${1:name}(self, $2):
|
||||
"""$3
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#name : for ... in ... : ...
|
||||
# key: for
|
||||
# --
|
||||
for ${var} in ${collection}:
|
||||
$0
|
||||
@@ -1,4 +1,5 @@
|
||||
#name : if __name__ == '__main__': ...
|
||||
# key: python-modeifmain
|
||||
# --
|
||||
if __name__ == '__main__':
|
||||
$0
|
||||
@@ -1,5 +1,6 @@
|
||||
# contributor: Mads D. Kristensen <madsdk@gmail.com>
|
||||
# name: prop
|
||||
# key: prop
|
||||
# --
|
||||
def ${1:foo}():
|
||||
doc = """${2:Doc string}"""
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#contributor : Julio Carlos Menendez <godinblack@gmail.com>
|
||||
#name : _get_foo ... foo=property(...)
|
||||
# key: propg
|
||||
# --
|
||||
def _get_${1:foo}(self):
|
||||
return self._$1
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#contributor : Julio Carlos Menendez <godinblack@gmail.com>
|
||||
#name : _get_foo ... _set_foo ... foo=property(...)
|
||||
# key: propsg
|
||||
# --
|
||||
def _set_${1:foo}(self, value):
|
||||
self._$1 = value
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#name : while ... : ...
|
||||
# key: while
|
||||
# --
|
||||
while ${condition}:
|
||||
$0
|
||||
Reference in New Issue
Block a user