diff --git a/UltiSnips/python.snippets b/UltiSnips/python.snippets index a5ef2aa..6dfa3c9 100644 --- a/UltiSnips/python.snippets +++ b/UltiSnips/python.snippets @@ -16,6 +16,12 @@ if __name__ == `!p snip.rv = get_quoting_style(snip)`__main__`!p snip.rv = get_q ${1:${VISUAL:main()}} endsnippet +snippet with "with" b +with ${1:expr}`!p snip.rv = " as " if t[2] else ""`${2:var}: + ${3:${VISUAL:pass}} +${0} +endsnippet + snippet for "for loop" b for ${1:item} in ${2:iterable}: ${3:${VISUAL:pass}}