diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-31 01:28:43 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-31 01:28:43 +1200 |
commit | fbbdef24c8520297e036afae2617c56d8fa3cf63 (patch) | |
tree | 8b3b92b11d0e9f0b06ba8f803ac3c310b0caad47 /vim/autoload/put_date.vim | |
parent | Merge branch 'release/v9.13.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-9.14.0.tar.gz (sig) dotfiles-9.14.0.zip |
Merge branch 'release/v9.14.0'v9.14.0
* release/v9.14.0:
Spin put_date.vim out into its own plugin
Diffstat (limited to 'vim/autoload/put_date.vim')
-rw-r--r-- | vim/autoload/put_date.vim | 24 |
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 |