vim:keys: Fix <Cmd> vmaps
When switching to <Cmd> for mappings in fc9874bf97 ("vim:keys: Use
<Cmd> for plain command mappings") I forgot that the previously inserted
selection range marks (i.e. '<,'>) are missing now. This broke vmaps
that used :substitute without having added them manually.
Since <Cmd> has some performance benefits, I want to keep it and add the
missing marks where needed.
This commit is contained in:
@@ -275,7 +275,7 @@ augroup END
|
|||||||
" Convert Unix timestamp to human readable
|
" Convert Unix timestamp to human readable
|
||||||
" Mnemonic: "Unix timestamp convert" with pun to UTC
|
" Mnemonic: "Unix timestamp convert" with pun to UTC
|
||||||
nnoremap <leader>utc ciw<C-r>=strftime("%F %T", @")<CR><Esc>
|
nnoremap <leader>utc ciw<C-r>=strftime("%F %T", @")<CR><Esc>
|
||||||
vnoremap <leader>utc <Cmd>s/\v(^\|[^0-9])\zs[0-9]{10}\ze([^0-9]\|$)/\=strftime("%F %T",submatch(0))/g<CR>
|
vnoremap <leader>utc <Cmd>'<,'>s/\v(^\|[^0-9])\zs[0-9]{10}\ze([^0-9]\|$)/\=strftime("%F %T",submatch(0))/g<CR>
|
||||||
|
|
||||||
" TODO: <leader>sec that uses the `duration` alias from zsh
|
" TODO: <leader>sec that uses the `duration` alias from zsh
|
||||||
|
|
||||||
@@ -489,7 +489,7 @@ augroup macro_type
|
|||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
" Escape underscores (useful when writing LaTeX)
|
" Escape underscores (useful when writing LaTeX)
|
||||||
vmap <leader>\_ <Cmd>s/\v(^<Bar>[^\\])\zs\ze_/\\/g<CR>
|
vmap <leader>\_ <Cmd>'<,'>s/\v(^<Bar>[^\\])\zs\ze_/\\/g<CR>
|
||||||
|
|
||||||
" TODO: make `gf` open absolute paths relative to PWD if possible
|
" TODO: make `gf` open absolute paths relative to PWD if possible
|
||||||
"
|
"
|
||||||
|
|||||||
Reference in New Issue
Block a user