From 890c4fc771dd702f7ed3be73c7edfad6a1873dbb Mon Sep 17 00:00:00 2001 From: djdt Date: Sun, 28 Aug 2016 21:03:32 +1000 Subject: [PATCH 1/2] Allow expansion of dates within braces etc. --- UltiSnips/all.snippets | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/UltiSnips/all.snippets b/UltiSnips/all.snippets index 0e286e5..a1db587 100644 --- a/UltiSnips/all.snippets +++ b/UltiSnips/all.snippets @@ -73,4 +73,27 @@ snippet modeline "Vim modeline" vim`!v ':set '. (&expandtab ? printf('et sw=%i ts=%i', &sw, &ts) : printf('noet sts=%i sw=%i ts=%i', &sts, &sw, &ts)) . (&tw ? ' tw='. &tw : '') . ':'` endsnippet +######### +# DATES # +######### +snippet date "YYYY-MM-DD" w +`date +%Y-%m-%d` +endsnippet + +snippet ddate "Month DD, YYYY" w +`date +%B\ %d,\ %Y` +endsnippet + +snippet diso "ISO format datetime" w +`date +%Y-%m-%dT%H:%M:%S` +endsnippet + +snippet time "hh:mm" w +`date +%H:%M` +endsnippet + +snippet datetime "YYYY-MM-DD hh:mm" w +`date +%Y-%m-%d\ %H:%M` +endsnippet + # vim:ft=snippets: From 8ce8c77b876eb315fa048212a285224eb353a125 Mon Sep 17 00:00:00 2001 From: djdt Date: Sun, 28 Aug 2016 21:13:25 +1000 Subject: [PATCH 2/2] ISO timezone --- UltiSnips/all.snippets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UltiSnips/all.snippets b/UltiSnips/all.snippets index a1db587..8b7079e 100644 --- a/UltiSnips/all.snippets +++ b/UltiSnips/all.snippets @@ -85,7 +85,7 @@ snippet ddate "Month DD, YYYY" w endsnippet snippet diso "ISO format datetime" w -`date +%Y-%m-%dT%H:%M:%S` +`date +%Y-%m-%dT%H:%M:%S%:z` endsnippet snippet time "hh:mm" w