f89668b148ec
Add ms2utc mapping
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Wed, 02 Apr 2014 13:37:40 -0400 |
parents | a7cca44a722f |
children | dea5f01cd866 |
branches/tags | (none) |
files | vim/vimrc |
Changes
--- a/vim/vimrc Wed Apr 02 12:11:49 2014 -0400 +++ b/vim/vimrc Wed Apr 02 13:37:40 2014 -0400 @@ -2331,6 +2331,20 @@ " 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) ---------------------------------------------- {{{