commit 1081d46149bb826d403d0080b79708ce2fc6d8e3 parent 78c5596d33584fcf7bb0dd2f2b4b528b49355499 Author: Pablo Cárdenas <pablo.cardenas@imca.edu.pe> Date: Mon, 22 May 2023 11:42:33 -0500 Updated python ultisnippets Diffstat:
| M | UltiSnips/python.snippets | | | 21 | +++++++++++++++++++-- |
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/UltiSnips/python.snippets b/UltiSnips/python.snippets @@ -404,9 +404,9 @@ endsnippet snippet perf_counter "time.perf_counter()" b start_time = time.perf_counter() -print("Start: ${1:name}"} +print("Start: ${1:name}") -${1:${VISUAL:pass}} +${2:${VISUAL:pass}} end_time = time.perf_counter() print(f"End: $1 ({end_time - start_time:.2f}s)") @@ -484,3 +484,20 @@ window = loader.load(ui_file) ui_file.close() window.show() endsnippet + + +snippet ET "xml.etree.ElementTree" b +tree = ET.parse(${1:path}) +${2:root} = tree.getroot() +endsnippet + + +snippet win32clipboard "win32clipboard" b +win32clipboard.OpenClipboard() +clipboard = win32clipboard.GetClipboardData() +win32clipboard.CloseClipboard() +endsnippet + +snippet printf "print(f'{value=}')" b +print(f"{${1:value}=}") +endsnippet