aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-07 10:21:25 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-07 11:50:57 +1300
commitdc0ab08ed472c4db827360bfc9f5959e675a6c8a (patch)
tree4bfbcbd91ce99b2ebccb202100219e74e348bc2c
parente85e3a2549fdbc2c3391ec92d4c179642d05bffb (diff)
downloaddotfiles-dc0ab08ed472c4db827360bfc9f5959e675a6c8a.tar.gz
Add leader bindings for date stamping
\d adds local time, \D adds UTC time.
-rw-r--r--vim/config/command.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/vim/config/command.vim b/vim/config/command.vim
index f339635f..09ee0f40 100644
--- a/vim/config/command.vim
+++ b/vim/config/command.vim
@@ -25,3 +25,12 @@ set shellpipe=>
if exists('+shellslash')
set shellslash
endif
+
+" \d inserts the current local date from date(1)
+nnoremap <silent>
+ \ <Leader>d
+ \ :<C-U>read !date<CR>
+" \D inserts the current UTC date from date(1)
+nnoremap <silent>
+ \ <Leader>D
+ \ :<C-U>read !date -u<CR>