Various minor adjustments to snippets
This commit is contained in:
parent
def3c6b531
commit
d42f1f53e8
|
@ -38,8 +38,8 @@ for parameter in parameters:
|
||||||
paramless = parameter.replace("\t", "")
|
paramless = parameter.replace("\t", "")
|
||||||
snip.rv += f"-- @variable {paramless}\n"
|
snip.rv += f"-- @variable {paramless}\n"
|
||||||
`-- @description $5
|
`-- @description $5
|
||||||
function ${1:Name}($2`!p if (t[2] == ""):
|
function ${1:Name}${2:a, b: Integer}`!p if (t[2] != "" and not t[2].startswith("(")):
|
||||||
t[2] = "a, b: Integer"`) return ${3:Integer} is
|
t[2] = f"({t[2]})"` return ${3:Integer} is
|
||||||
$4
|
$4
|
||||||
begin
|
begin
|
||||||
$7
|
$7
|
||||||
|
|
|
@ -18,9 +18,9 @@ endsnippet
|
||||||
|
|
||||||
snippet article "Add article reference" b
|
snippet article "Add article reference" b
|
||||||
@article{${1:ref_name},
|
@article{${1:ref_name},
|
||||||
title={${2:Titel}},
|
title = {${2:Titel}},
|
||||||
author={${3:Autor}},
|
author = {${3:Autor}},
|
||||||
journal={${4:Journal}},`!p
|
journal = {${4:Journal}},`!p
|
||||||
if t[5] != "":
|
if t[5] != "":
|
||||||
snip.rv = "\n\tvolume\t= {"
|
snip.rv = "\n\tvolume\t= {"
|
||||||
else:
|
else:
|
||||||
|
@ -45,8 +45,9 @@ if t[7] != "":
|
||||||
snip.rv = "},"
|
snip.rv = "},"
|
||||||
else:
|
else:
|
||||||
snip.rv = ""`
|
snip.rv = ""`
|
||||||
year={${8:2023}},
|
year = {${8:2023}},
|
||||||
publisher={${9:Verlag}}
|
doi = {${9:DOI_NUM}}
|
||||||
|
publisher = {${10:Verlag}}
|
||||||
}
|
}
|
||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
|
@ -75,3 +75,14 @@ endsnippet
|
||||||
snippet println "println" A
|
snippet println "println" A
|
||||||
println!("$1");$0
|
println!("$1");$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet docstring "Document head" b
|
||||||
|
/*
|
||||||
|
* Filename: `!p snip.rv = fn`
|
||||||
|
* Author: ${1:Yannick Reiss}
|
||||||
|
* Project: ${2:Project Name}
|
||||||
|
* Copyright: ${3:None} => You • 9 months ago • Move of Snippets into repository
|
||||||
|
* Description: ${4:Funny module}
|
||||||
|
*
|
||||||
|
*/$0
|
||||||
|
endsnippet
|
||||||
|
|
|
@ -484,6 +484,6 @@ else:
|
||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet cc "Cite" A
|
snippet cc "Cite" iA
|
||||||
\\cite{$1}$0
|
\\cite{$1}$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
snippet tg "automated tag insertion" b
|
||||||
|
<${1:tag}>
|
||||||
|
$2
|
||||||
|
</${1/(\w+).*/$1/}>$0
|
||||||
|
endsnippet
|
Loading…
Reference in New Issue