aboutsummaryrefslogtreecommitdiff
path: root/vim/autoload
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-16 20:19:19 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-16 20:19:19 +1200
commit20d4d7c73e6e095f7328f986e235b7385e073f09 (patch)
tree17e444c31c807e6d5838017342e7d2977de92114 /vim/autoload
parentConsolidate utc.vim and put_date.vim into latter (diff)
downloaddotfiles-20d4d7c73e6e095f7328f986e235b7385e073f09.tar.gz
dotfiles-20d4d7c73e6e095f7328f986e235b7385e073f09.zip
Refactor and fix arg errors in put_date.vim plugin
Diffstat (limited to 'vim/autoload')
-rw-r--r--vim/autoload/put_date.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/vim/autoload/put_date.vim b/vim/autoload/put_date.vim
index 2b618632..c9f52c12 100644
--- a/vim/autoload/put_date.vim
+++ b/vim/autoload/put_date.vim
@@ -1,10 +1,10 @@
let s:rfc_2822 = '%a, %d %b %Y %T %z'
-function! put_date#(line, bang, ...) abort
+function! put_date#(line, utc, format) abort
let line = a:line
- let utc = a:bang ==# '!'
- let format = a:0
- \ ? substitute(a:1, '\a', '%&', 'g')
+ let utc = a:utc
+ let format = strlen(a:format)
+ \ ? substitute(a:format, '\a', '%&', 'g')
\ : s:rfc_2822
if utc
if exists('$TZ')