removed merge conflichts
This commit is contained in:
@@ -8,13 +8,13 @@ endsnippet
|
||||
snippet fun "New Function"
|
||||
${1:int} ${2:MyFunc} (${3:void}) {
|
||||
`!p
|
||||
if t[1] != "void":
|
||||
snip.rv = f"{t[1]} rv = 0;"
|
||||
if t[1].replace('static ', '') != "void":
|
||||
snip.rv = f"{t[1].replace('static ', '')} rv = 0;"
|
||||
else:
|
||||
snip.rv = ""`
|
||||
$5
|
||||
`!p
|
||||
if t[1] != "void":
|
||||
if t[1].replace('static ', '') != "void":
|
||||
snip.rv = f"return rv;"
|
||||
else:
|
||||
snip.rv = ""`
|
||||
@@ -25,13 +25,13 @@ endsnippet
|
||||
snippet "(\w+)->fun" "Struct function" r
|
||||
${1:int} ${2:Name} (`!p snip.rv = match.group(1)`* self, ${4:void}) {
|
||||
`!p
|
||||
if t[1] != "void":
|
||||
snip.rv = f"{t[1]} rv = 0;"
|
||||
if t[1].replace('static ', '') != "void":
|
||||
snip.rv = f"{t[1].replace('static ', '')} rv = 0;"
|
||||
else:
|
||||
snip.rv = ""`
|
||||
$5
|
||||
`!p
|
||||
if t[1] != "void":
|
||||
if t[1].replace('static ', '') != "void":
|
||||
snip.rv = f"return rv;"
|
||||
else:
|
||||
snip.rv = ""`
|
||||
@@ -74,13 +74,13 @@ snip.rv = rval`
|
||||
*/
|
||||
${1:int} ${2:MyFunc} (${3:void}) {
|
||||
`!p
|
||||
if t[1] != "void":
|
||||
snip.rv = f"{t[1]} rv = 0;"
|
||||
if t[1].replace('static ', '') != "void":
|
||||
snip.rv = f"{t[1].replace('static ', '')} rv = 0;"
|
||||
else:
|
||||
snip.rv = ""`
|
||||
$5
|
||||
`!p
|
||||
if t[1] != "void":
|
||||
if t[1].replace('static ', '') != "void":
|
||||
snip.rv = f"return rv;"
|
||||
else:
|
||||
snip.rv = ""`
|
||||
|
||||
@@ -17,7 +17,7 @@ endsnippet
|
||||
snippet exfun "New Function with Documentation"
|
||||
/**
|
||||
* @name $2
|
||||
* @return $1
|
||||
* @return `!p t[1].replace("static ", "")`
|
||||
* @brief ${4: Description}
|
||||
*
|
||||
`!p
|
||||
@@ -31,12 +31,12 @@ snip.rv = rval`
|
||||
${1:int} ${2:MyFunc} (${3:void}) {
|
||||
`!p
|
||||
if t[1] != "void":
|
||||
snip.rv = f"{t[1]} rv = 0;"
|
||||
snip.rv = f"{t[1].replace('static ', '')} rv = 0;"
|
||||
else:
|
||||
snip.rv = ""`
|
||||
$5
|
||||
`!p
|
||||
if t[1] != "void":
|
||||
if t[1].replace("static ", "") != "void":
|
||||
snip.rv = f"return rv;"
|
||||
else:
|
||||
snip.rv = ""`
|
||||
@@ -49,7 +49,7 @@ ${1:int} ${2:Name} (${3:void}) {
|
||||
$5
|
||||
|
||||
return ${6:`!p
|
||||
if t[1] != "void":
|
||||
if t[1].replace("static ", "") != "void":
|
||||
snip.rv = f"0"
|
||||
else:
|
||||
snip.rv = ""`};
|
||||
|
||||
32
UltiSnips/csv.snippets
Normal file
32
UltiSnips/csv.snippets
Normal file
@@ -0,0 +1,32 @@
|
||||
global !p
|
||||
def complete(t, opts):
|
||||
if t:
|
||||
opts = [ m[len(t):] for m in opts if m.startswith(t)]
|
||||
if len(opts) == 1:
|
||||
return opts[0]
|
||||
else:
|
||||
return f"({'|'.join(opts)})"
|
||||
endglobal
|
||||
|
||||
snippet mv "Mitglied DLRG Neuaufnahme" bA
|
||||
${1}`!p
|
||||
snip.rv = complete(t[1], ["Herr", "Frau", "Ohne"])
|
||||
`,${2:Vorname},${3:Nachname},${4:63165}`!p
|
||||
snip.rv = complete(t[4], ["63165"])`,${5:Adresse},${6:Telefonnummer},${7:Email},${8:Geburtsdatum}`!p
|
||||
if t[8] != "Geburtsdatum" and len(t[8]) == 8:
|
||||
if len(t[8]) > 2:
|
||||
t[8] = f"{t[8][0:2]}.{t[8][2:]}"
|
||||
if len(t[8]) > 4:
|
||||
t[8] = f"{t[8][:5]}.{t[8][5:]}"
|
||||
`,${9:Eintrittsdatum}`!p
|
||||
if t[9] != "Eintrittsdatum" and len(t[9]) == 8:
|
||||
if len(t[9]) > 2:
|
||||
t[9] = f"{t[9][0:2]}.{t[9][2:]}"
|
||||
if len(t[9]) > 4:
|
||||
t[9] = f"{t[9][:5]}.{t[9][5:]}"
|
||||
`,DE${10:IBAN}`!p
|
||||
if len(t[10]) >= 25:
|
||||
t[10] = t[10].replace(' ', '')
|
||||
`,${11:Kontoinhaber*in}
|
||||
$0
|
||||
endsnippet
|
||||
@@ -13,6 +13,14 @@ $1
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet cc "C Code" b
|
||||
\`\`\`c
|
||||
$1
|
||||
\`\`\`
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
|
||||
snippet csql "SQL Code"
|
||||
\`\`\`sql
|
||||
$1
|
||||
|
||||
@@ -50,7 +50,7 @@ if t[2] != "Eintrittsdatum" and len(t[2]) == 8:
|
||||
if len(t[2]) > 4:
|
||||
t[2] = f"{t[2][:5]}.{t[2][5:]}"
|
||||
`|${3:Geburtsdatum}`!p
|
||||
if t[3] != "Eintrittsdatum" and len(t[3]) == 8:
|
||||
if t[3] != "Geburtsdatum" and len(t[3]) == 8:
|
||||
if len(t[3]) > 2:
|
||||
t[3] = f"{t[3][0:2]}.{t[3][2:]}"
|
||||
if len(t[3]) > 4:
|
||||
|
||||
Reference in New Issue
Block a user