Enhance python with
snippet for UltiSnips
* the `with` snippet in UltiSnips now contains a VISUAL element * The `as` keyword portion of a with statement now uses python interpolation to determine presence
This commit is contained in:
parent
2bea94ce85
commit
1d61b86ab7
@ -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}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user