Compare commits
2 Commits
7daedc0b31
...
437ce3ff2e
Author | SHA1 | Date |
---|---|---|
|
437ce3ff2e | |
|
4ad4a777f6 |
|
@ -10,6 +10,42 @@ snippet credhsrm "Credentials HSRM"
|
||||||
Yannick Reiß <yannick.reiss@student.hs-rm.de>
|
Yannick Reiß <yannick.reiss@student.hs-rm.de>
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
global !p
|
||||||
|
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
def get_datetime():
|
||||||
|
now = datetime.now()
|
||||||
|
now_as_list = [
|
||||||
|
now.strftime("%d"),
|
||||||
|
now.strftime("%m"),
|
||||||
|
now.strftime("%Y"),
|
||||||
|
now.strftime("%H"),
|
||||||
|
now.strftime("%M")
|
||||||
|
]
|
||||||
|
return now_as_list
|
||||||
|
|
||||||
|
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 "(" + '|'.join(opts) + ")"
|
||||||
|
|
||||||
|
endglobal
|
||||||
|
|
||||||
|
snippet mail "Template for a new delayed Mail" b
|
||||||
|
time:${1:`!p snip.rv = get_datetime()[0]`}.${2:`!p snip.rv = get_datetime()[1]`}.${3:`!p snip.rv = get_datetime()[2]`} ${4:`!p snip.rv = get_datetime()[3]`}:${5:`!p snip.rv = get_datetime()[4]`}
|
||||||
|
from:$6`!p snip.rv = complete(t[6], ['yannick.reiss@nickr.eu', 'schnick@nickr.eu'])`
|
||||||
|
to:${7:schnick@nickr.eu}
|
||||||
|
subject:${8:Subject}
|
||||||
|
|
||||||
|
${9:Message}
|
||||||
|
|
||||||
|
${10:`cat ~/.signature.txt`}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
snippet crednina "My true credentials"
|
snippet crednina "My true credentials"
|
||||||
Nina Chloé Kassandra Reiß <nina.reiss@nickr.eu>
|
Nina Chloé Kassandra Reiß <nina.reiss@nickr.eu>
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
Loading…
Reference in New Issue