From 21af8bc2faabce8dd85e74909aa5357e6b66d844 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 12 Jun 2018 10:23:59 +1200 Subject: Check for +unix before binding date commands --- vim/vimrc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 2919d930..a2363e88 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -85,10 +85,13 @@ if has('cmdline_info') endif -" \d inserts the current local date from date(1) -nnoremap d :read !date -" \D inserts the current UTC date from date(1) -nnoremap D :read !date -u +" Current date and time insertion commands, requiring POSIX date(1) +if has('unix') + " \d: Local + nnoremap d :read !date + " \D: UTC + nnoremap D :read !date -u +endif " Don't try to complete strings from included files, just use the strings in " the open buffers; I'll open the file if I want to complete from it -- cgit v1.2.3