vim:keys: Add <leader>utc to convert unix time
Add `<leader>utc` to convert unix timestamps into a human readable format.
This commit is contained in:
@@ -200,3 +200,8 @@ xnoremap gm :Man <C-r><C-a><CR>
|
||||
|
||||
" Format the current paragraph
|
||||
nmap Q gqap
|
||||
|
||||
" Convert Unix timestamp to human readable
|
||||
" Mnemonic: "Unix timestamp convert" with pun to UTC
|
||||
nnoremap <leader>utc ciw<C-r>=strftime("%c", @")<CR><Esc>
|
||||
vnoremap <leader>utc :s/\v(^\|[^0-9])\zs[0-9]{10}\ze([^0-9]\|$)/\=strftime("%c",submatch(0))/g<CR>
|
||||
|
||||
Reference in New Issue
Block a user