diff --git a/src/.config/nvim/ultisnips/all.snippets b/src/.config/nvim/ultisnips/all.snippets index 6d6733a..c8c440a 100644 --- a/src/.config/nvim/ultisnips/all.snippets +++ b/src/.config/nvim/ultisnips/all.snippets @@ -3,7 +3,13 @@ snippet shrug "shrug emoticon" endsnippet snippet timestamp "unix time for today" -`date -d "$(date +"%Y-%m-%d 15:45")" +%s` +`date -d "$(date +"%Y-%m-%d")" +%s` +endsnippet +snippet "datestamp (.*)" "unix time (YYYY-MM-DD)" r +`!p +from time import mktime, strptime +snip.rv = int(mktime(strptime(match.group(1), "%Y-%m-%d"))) +` endsnippet snippet today "normal formatted date for today" i