From 2e3ed1455fb4823a6b11ea14071b432b67d845c3 Mon Sep 17 00:00:00 2001 From: valeth Date: Fri, 22 Apr 2016 09:55:44 +0200 Subject: [PATCH] add note type selector script for c --- pythonx/ultisnips/c.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pythonx/ultisnips/c.py b/pythonx/ultisnips/c.py index 98db27e..ba66ce4 100644 --- a/pythonx/ultisnips/c.py +++ b/pythonx/ultisnips/c.py @@ -14,3 +14,13 @@ def returnval(t): else: return "return NULL;" +def getNoteCandidates(t): + options = ["TODO", "FIXME", "XXX"] + if t: + options = [ x[len(t):] for x in options if x.startswith(t) ] + + if len(options) == 1: + return options[0] + + return "[" + ",".join(options) + "]" +