diff --git a/vim/vimrc b/vim/vimrc index 3e2aa1d..0bcc6d1 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -179,7 +179,12 @@ nnoremap :call NumberToggle() command! -nargs=+ MapToggle call MapToggle() " Keys & functions {{{ " Insert timestamp (insert mode) - inoremap strftime('%FT%T%z') . ": " + if has("win32") + " to get the +xx:xx form we need to use powershell :-( + inoremap substitute(system("powershell -noprofile -command Get-Date -Format 'yyyy-MM-ddTHH:mm:sszzzz: '"),'[\r\n]*$','','') + else + inoremap strftime('%Y-%m-%dT%H:%I:%S%z: ') + endif " toggle NERDTree (normal & input-mode) inoremap :NERDTreeToggle nnoremap :NERDTreeToggle