blob: 8094025f6932a28ff797e50964b6f7b0a5137b73 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
global !p
def make_comment():
b, e = vim.eval("&commentstring").split( '%s' )
return b, e
endglobal
snippet todo "A universal TODO reminder" b
`!p
comment = make_comment()
snip.rv = comment[ 0 ]
` TODO: ${1:desc} (`!v $USER`, `!v strftime("%c")`) `!p
comment = make_comment()
snip.rv = comment[ 1 ]`
$0
endsnippet
snippet fix "A universal FIXME reminder" b
`!p
comment = make_comment()
snip.rv = comment[ 0 ]
` FIXME: ${1:desc} (`!v $USER`, `!v strftime("%c")`) `!p
comment = make_comment()
snip.rv = comment[ 1 ]`
$0
endsnippet
|