summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2015-04-19 14:20:07 +0100
committerUrbain Vaes <urbain@vaes.uk>2015-04-19 14:20:07 +0100
commitb5275a77012af88f874fb58dc60a87c1674a4643 (patch)
tree922b830d6b78a899358610f41b0dbb0d3358e13b
parent787cf6945e092d949ed3609e0331ac564dd27f7d (diff)
Added todo snippets
-rw-r--r--vim/mySnippets/all.snippets26
1 files changed, 24 insertions, 2 deletions
diff --git a/vim/mySnippets/all.snippets b/vim/mySnippets/all.snippets
index 9328a1e..8094025 100644
--- a/vim/mySnippets/all.snippets
+++ b/vim/mySnippets/all.snippets
@@ -1,3 +1,25 @@
-snippet jul "Jul the boss"
-Jul is the boss of ${0:dance}
+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