Skip to content

Commit 4d9d9c4

Browse files
fenukslpil
authored andcommitted
Add snippet generating random UUID, fixes honza#1028
1 parent b7540c3 commit 4d9d9c4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

UltiSnips/all.snippets

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,11 @@ snippet todo "TODO comment" bw
100100
`!p snip.rv=get_comment_format()[0]` ${2:TODO}: $0${3: <${4:`!v strftime('%d-%m-%y')`}${5:, `!v g:snips_author`}>} `!p snip.rv=get_comment_format()[2]`
101101
endsnippet
102102

103+
##########
104+
# Misc #
105+
##########
106+
snippet uuid "Random UUID" w
107+
`!p if not snip.c: import uuid; snip.rv = uuid.uuid4()`
108+
endsnippet
109+
103110
# vim:ft=snippets:

0 commit comments

Comments
 (0)