-
-
Save arusahni/fd29be9aeaafe6a9e430 to your computer and use it in GitHub Desktop.
Revisions
-
arusahni revised this gist
Nov 22, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ def formatTag(argument): tags = [formatTag(argument.strip()) for argument in t[2].split(',') if argument] if tags: snip.rv = "/**{0} */".format("".join(tags)) else: snip.rv = '' `${1}: function(${2}) { -
arusahni revised this gist
Nov 22, 2014 . 1 changed file with 3 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,16 +5,10 @@ snippet fun "function with dynamic docblock" b def formatTag(argument): return " * @param {{}} {0}".format(argument) tags = [formatTag(argument.strip()) for argument in t[2].split(',') if argument] if tags: snip.rv = "/**{0} */ ".format("".join(tags)) else: snip.rv = '' `${1}: function(${2}) { -
lencioni created this gist
Nov 15, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ snippet fun "function with dynamic docblock" b `!p # Currently Ultisnips does not support dynamic tabstops, so we cannot add # tabstops to the datatype for these param tags until that feature is added. def formatTag(argument): return " * @param {{}} {0}".format(argument) arguments = t[2].split(',') arguments = [argument.strip() for argument in arguments if argument] if len(arguments): tags = map(formatTag, arguments) snip.rv = "/**" for tag in tags: snip += tag snip += ' */' snip += '' else: snip.rv = '' `${1}: function(${2}) { ${0:${VISUAL}} }, endsnippet