Commits

Steve Losh committed f89668b

Add ms2utc mapping

Comments (0)

Files changed (1)

 " vnoremap <leader>M :MarkUnchanged<cr>
 
 " }}}
+" MS to UTC {{{
+
+function! MS2UTC(ms)
+    let seconds = strpart(a:ms, 0, strlen(a:ms) - 3)
+    return substitute(system("date -ur " . seconds), "\n\n*", "", "")
+endfunction
+
+function! MS2UTCWord()
+    return MS2UTC(expand("<cword>"))
+endfunction
+
+nnoremap <leader>U :echo MS2UTCWord()<cr>
+
+" }}}
 
 " }}}
 " Environments (GUI/Console) ---------------------------------------------- {{{