aboutsummaryrefslogtreecommitdiff
path: root/vim/autoload
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-05-31 01:27:15 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-05-31 01:27:15 +1200
commit5ba79325a3ee4cb7d7217c4de3006abc51ba5f99 (patch)
tree9f3e6857d4234b6827db7a03d45132af53a57a99 /vim/autoload
parentMerge branch 'release/v9.12.0' into develop (diff)
downloaddotfiles-5ba79325a3ee4cb7d7217c4de3006abc51ba5f99.tar.gz
dotfiles-5ba79325a3ee4cb7d7217c4de3006abc51ba5f99.zip
Spin put_date.vim out into its own plugin
Diffstat (limited to 'vim/autoload')
-rw-r--r--vim/autoload/put_date.vim24
1 files changed, 0 insertions, 24 deletions
diff --git a/vim/autoload/put_date.vim b/vim/autoload/put_date.vim
deleted file mode 100644
index b0b0b548..00000000
--- a/vim/autoload/put_date.vim
+++ /dev/null
@@ -1,24 +0,0 @@
-" RFC2822 format string for strftime()
-let s:rfc_2822 = '%a, %d %b %Y %T %z'
-
-" Write a date to the buffer, UTC or local, in the specified format,
-" defaulting to RFC2822; formats are provided without the leading % signs
-" before each letter, like PHP date()
-"
-function! put_date#(line, utc, format) abort
- let line = a:line
- let utc = a:utc
- let format = strlen(a:format)
- \ ? substitute(a:format, '\a', '%&', 'g')
- \ : s:rfc_2822
- if utc
- if exists('$TZ')
- let tz = $TZ
- endif
- let $TZ = 'UTC'
- endif
- execute line.'put =strftime(format)'
- if exists('tz')
- let $TZ = tz
- endif
-endfunction