diff options
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | vim/autoload/put_date.vim | 24 | ||||
m--------- | vim/bundle/put_date | 0 | ||||
-rw-r--r-- | vim/plugin/put_date.vim | 6 |
5 files changed, 5 insertions, 32 deletions
diff --git a/.gitmodules b/.gitmodules index 41920514..e892cefb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -44,6 +44,9 @@ [submodule "vim/bundle/put_blank_lines"] path = vim/bundle/put_blank_lines url = https://sanctum.geek.nz/code/vim-put-blank-lines.git +[submodule "vim/bundle/put_date"] + path = vim/bundle/put_date + url = https://sanctum.geek.nz/code/vim-put-date.git [submodule "vim/bundle/quickfix_auto_open"] path = vim/bundle/quickfix_auto_open url = https://sanctum.geek.nz/code/vim-quickfix-auto-open.git @@ -1,2 +1,2 @@ -tejr dotfiles v9.13.0 -Sat, 30 May 2020 13:27:25 +0000 +tejr dotfiles v9.14.0 +Sat, 30 May 2020 13:28:41 +0000 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 diff --git a/vim/bundle/put_date b/vim/bundle/put_date new file mode 160000 +Subproject 598090797c2cb3a4fe945d2eacd3eca42a0cfe5 diff --git a/vim/plugin/put_date.vim b/vim/plugin/put_date.vim deleted file mode 100644 index 7848e95f..00000000 --- a/vim/plugin/put_date.vim +++ /dev/null @@ -1,6 +0,0 @@ -if exists('loaded_put_date') || &compatible || !exists('*strftime') - finish -endif -let loaded_put_date = 1 -command! -bang -bar -nargs=* -range PutDate - \ call put_date#(<q-line1>, <q-bang> ==# '!', <q-args>) |