diff --git a/.config/vim/vimrc.d/40-keys.vim b/.config/vim/vimrc.d/40-keys.vim index c5a08db..227c861 100644 --- a/.config/vim/vimrc.d/40-keys.vim +++ b/.config/vim/vimrc.d/40-keys.vim @@ -91,14 +91,14 @@ endif vnoremap * y/\V=escape(@",'/\') vnoremap # y?\V=escape(@",'?\') -" Search inside visual selection -noremap v/ /\%V - " Extended `*`. Starts vim search (without jump) and ripgrep search for cword nmap * :let @/ = '\<' . expand('') . '\>' \ set hlsearch \ Rg \b=expand('')\b +" Search inside visual selection +noremap v/ /\%V + " Select last pasted text in same visual mode as it was selected (v, V, or ^V) " Taken from: https://vim.fandom.com/wiki/Selecting_your_pasted_text nnoremap gp '`[' . strpart(getregtype(), 0, 1) . '`]'