dotfiles/vim/.vim/own-snippets/all.snippets

66 lines
1.2 KiB
Plaintext
Raw Normal View History

2019-08-15 03:52:35 +00:00
global !p
from datetime import datetime, timedelta
def relative_date(days):
time_difference = timedelta(days=int(days))
calculated_date = datetime.today() + time_difference
return calculated_date
endglobal
snippet "reldate (\d+)" "Prints out the relative date in ISO format." ri
`!p
reldate = relative_date(match.group(1))
snip.rv = reldate.strftime("%F")
`
endsnippet
snippet today "Prints out today's date in ISO format" i
`!p
from datetime import datetime
snip.rv = datetime.today().strftime("%F")
`
endsnippet
snippet sign "Quick signature" i
${1:Sincerely,}
${2:Gabriel Arazas}
$0
endsnippet
2019-12-20 02:44:54 +00:00
snippet ie "Parenthetical material Latin 'id est' (ie)" iw
(i.e., $1) $0
endsnippet
snippet eg "Parenthetical material Latin 'exempli gratia' (eg)" iw
(e.g., $1) $0
endsnippet
snippet em "Quick em dash"
endsnippet
snippet em-mat "Em dash material" iw
— $1 — $0
endsnippet
snippet em-ie "'id est' surrounded with em dash" iw
— i.e., $1 — $0
endsnippet
snippet em-eg "'exempli gratia' surrounded with em dash" iw
— e.g., $1 — $0
endsnippet
# Quick word snippets
# Each of these quick word snippets has a prefix of `qw-`
snippet qw-lx "LaTeX" iw
LaTeX
endsnippet
snippet qw-as "Asciidoctor" iw
Asciidoctor
endsnippet