Compare commits

..

2 Commits

Author SHA1 Message Date
Yannick Reiß e1a5e7f825 Bring order into global snippets
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 24s Details
2024-09-15 10:15:53 +02:00
Yannick Reiß ea0e244f05 Text file snippets are useless 2024-09-15 10:14:55 +02:00
2 changed files with 4 additions and 67 deletions

View File

@ -1,15 +1,11 @@
snippet cred "My private Credentials"
Yannick Reiss <yannick.reiss@nickr.eu>
endsnippet
snippet dd "Date and Time" i snippet dd "Date and Time" i
`date` `date`
endsnippet endsnippet
snippet credhsrm "Credentials HSRM" snippet cred "My private Credentials"
Yannick Reiß (yareissx/yreis001) <yannick.reiss@student.hs-rm.de> Nicki Reiss <yannick.reiss@nickr.eu>
endsnippet endsnippet
snippet gitfeed "New git feed entry." snippet credhsrm "Credentials HSRM"
${1:Datei}.html:${2:Message}$0 Yannick Reiß <yannick.reiss@student.hs-rm.de>
endsnippet endsnippet

View File

@ -1,59 +0,0 @@
snippet entry "Add new entry" bA
-----------------------------------------------------------
--- Title: $1
--- Date: ${2:`date`}
--- Author: ${3:`whoami`}
--- Host: `hostname`
-----------------------------------------------------------
Tags: $4
$5
-----------------------------------------------------------
$0
endsnippet
snippet 1) "Enumerated List" b
1) $1
`!p
if t[1] == "":
index = 2
if " \n" in t[1]:
t[1] = t[1].replace(" \n", f"\n{index})")
index += 1`
$0
endsnippet
snippet - "Itemized List" b
- $1
`!p
t[1] = t[1].replace(" \n", f"\n-")`
$0
endsnippet
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 mgl "DLRG neues Mitglied" b
${1:Num}|${2:Eintrittsdatum}`!p
if t[2] != "Eintrittsdatum" and len(t[2]) == 8:
if len(t[2]) > 2:
t[2] = f"{t[2][0:2]}.{t[2][2:]}"
if len(t[2]) > 4:
t[2] = f"{t[2][:5]}.{t[2][5:]}"
`|${3:Geburtsdatum}`!p
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:
t[3] = f"{t[3][:5]}.{t[3][5:]}"
`|${4:PLZ}|${5}`!p snip.rv= complete(t[5], ['Offenbach', 'Hanau', 'Mühlheim', 'Frankfurt'])`|${6:Adresse}|${7:Nachname}`!p t[7] = t[7].upper()`, ${8:Vorname}
endsnippet