Merge pull request #392 from feju/master

Julia: New documentation snippets
This commit is contained in:
Holger Rapp 2014-06-26 06:47:06 +02:00
commit 368acf7e27
2 changed files with 37 additions and 0 deletions

34
UltiSnips/julia.snippets Normal file
View File

@ -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

View File

@ -69,6 +69,9 @@ snippet ife full if-else statement
${0} ${0}
end end
snippet tern ternary operator
${1} ? ${2} : ${3:nothing}
# Exceptions # Exceptions
snippet try try catch snippet try try catch
try try