diff --git a/UltiSnips/julia.snippets b/UltiSnips/julia.snippets new file mode 100644 index 0000000..259c5f4 --- /dev/null +++ b/UltiSnips/julia.snippets @@ -0,0 +1,34 @@ +# Documentation +snippet docf "function documentation" b +#' @description +#' +#' ${1:function description} +#' +#' ${2:@param ${3:name}::${4:Type} ${5:Description}} +#' +#' ${6:@returns ${7:name}::${8:Type} ${9:Description}} +#' +#' @examples +#' +#' ${10: function call examples} +endsnippet + +snippet doct "type definition" b +#' @description +#' +#' ${1:type description} +#' +#' ${2:@field ${3:name}::${4:Type} ${5:Description}} +#' +#' @examples +#' +#' ${10: constructor examples} +endsnippet + +snippet par "function parameter documentation" b +#' @param ${1:name}::${2:Type} ${0:Description} +endsnippet + +snippet fld "type field documentation" b +#' @field ${1:name}::${2:Type} ${0:Description} +endsnippet diff --git a/snippets/julia.snippets b/snippets/julia.snippets index 77a7dac..1876ed8 100644 --- a/snippets/julia.snippets +++ b/snippets/julia.snippets @@ -69,6 +69,9 @@ snippet ife full if-else statement ${0} end +snippet tern ternary operator + ${1} ? ${2} : ${3:nothing} + # Exceptions snippet try try catch try