dotfiles/.config/nvim/snippets/languages/python/python.json
2024-01-05 10:55:47 +01:00

19 lines
549 B
JSON

{
"list comprehension": {
"body": "list(${1:value} for ${2:value} in ${3:iterable})$0",
"description": "List comprehension for creating a list based on existing lists.",
"prefix": "list comprehension"
},
"replace (regex)": {
"body": "re.sub(r\"${1:regex}\", r\"${2:replace}\", ${3:str})$0",
"prefix": "replace (regex)"
},
"ternary": {
"body": "${1:value1} if ${2:condition} else ${3:value2}",
"prefix": "ternary"
},
"while": {
"body": "while ${1:condition}:\n\t${2:pass}$0",
"prefix": "while"
}
}