diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-12 10:23:59 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-12 10:23:59 +1200 |
commit | 21af8bc2faabce8dd85e74909aa5357e6b66d844 (patch) | |
tree | ee206c8bb1d36050a5d54bdfd38e27b03b8b5976 /vim | |
parent | Correct Mutt filename pattern (diff) | |
download | dotfiles-21af8bc2faabce8dd85e74909aa5357e6b66d844.tar.gz dotfiles-21af8bc2faabce8dd85e74909aa5357e6b66d844.zip |
Check for +unix before binding date commands
Diffstat (limited to 'vim')
-rw-r--r-- | vim/vimrc | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -85,10 +85,13 @@ if has('cmdline_info') 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> +" Current date and time insertion commands, requiring POSIX date(1) +if has('unix') + " \d: Local + nnoremap <silent> <Leader>d :<C-U>read !date<CR> + " \D: UTC + nnoremap <silent> <Leader>D :<C-U>read !date -u<CR> +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 |