diff --git a/mappings.vim b/mappings.vim index a5c200c..da0781e 100644 --- a/mappings.vim +++ b/mappings.vim @@ -119,8 +119,8 @@ nnoremap ev :tabnew $MYVIMRC tcd %:h nnoremap sv :silent update $MYVIMRC source $MYVIMRC \ echomsg "Nvim config successfully reloaded!" -" Reselect the text that has just been pasted -nnoremap v `[V`] +" Reselect the text that has just been pasted, see also https://stackoverflow.com/a/4317090/6064933. +nnoremap v printf('`[%s`]', getregtype()[0]) " Search in selected region vnoremap / :call feedkeys('/\%>'.(line("'<")-1).'l\%<'.(line("'>")+1)."l")