diff --git a/nvim/.config/nvim/plugin/epoch-converter.vim b/nvim/.config/nvim/plugin/epoch-converter.vim index fc77f0d..8fe3e80 100644 --- a/nvim/.config/nvim/plugin/epoch-converter.vim +++ b/nvim/.config/nvim/plugin/epoch-converter.vim @@ -1,6 +1,6 @@ function GetHumanReadableDate() - let epoch = expand("") - let date = trim(system("date -d @" . epoch)) + normal! `y + let date = trim(system("date -d @" . trim(shellescape(@@)))) echo date endfunction @@ -10,5 +10,5 @@ function GetEpochDate() echo date endfunction -nnoremap e :call GetHumanReadableDate() -xnoremap e :call GetEpochDate() +xnoremap e :call GetHumanReadableDate() +xnoremap E :call GetEpochDate()