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
parentAdd \p Vim binding to show filetype (diff)
downloaddotfiles-dc0ab08ed472c4db827360bfc9f5959e675a6c8a.tar.gz
dotfiles-dc0ab08ed472c4db827360bfc9f5959e675a6c8a.zip
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>