diff --git a/.config/vim/vimrc.d/40-keys.vim b/.config/vim/vimrc.d/40-keys.vim index 9cd85b5..49aa9bd 100644 --- a/.config/vim/vimrc.d/40-keys.vim +++ b/.config/vim/vimrc.d/40-keys.vim @@ -275,7 +275,7 @@ augroup END " Convert Unix timestamp to human readable " Mnemonic: "Unix timestamp convert" with pun to UTC nnoremap utc ciw=strftime("%F %T", @") -vnoremap utc s/\v(^\|[^0-9])\zs[0-9]{10}\ze([^0-9]\|$)/\=strftime("%F %T",submatch(0))/g +vnoremap utc '<,'>s/\v(^\|[^0-9])\zs[0-9]{10}\ze([^0-9]\|$)/\=strftime("%F %T",submatch(0))/g " TODO: sec that uses the `duration` alias from zsh @@ -489,7 +489,7 @@ augroup macro_type augroup END " Escape underscores (useful when writing LaTeX) -vmap \_ s/\v(^[^\\])\zs\ze_/\\/g +vmap \_ '<,'>s/\v(^[^\\])\zs\ze_/\\/g " TODO: make `gf` open absolute paths relative to PWD if possible "