diff --git a/.config/vim/vimrc.d/40-keys.vim b/.config/vim/vimrc.d/40-keys.vim index f8f3df3..3d354c3 100644 --- a/.config/vim/vimrc.d/40-keys.vim +++ b/.config/vim/vimrc.d/40-keys.vim @@ -91,8 +91,10 @@ endif vnoremap * y/\V=escape(@",'/\') vnoremap # y?\V=escape(@",'?\') -" Use ripgrep as search-engine for `*` -nmap * :Rg \b=expand('')\b +" Extended `*`. Starts vim search (without jump) and ripgrep search for cword +nmap * :let @/ = '\<' . expand('') . '\>' + \ set hlsearch + \ Rg \b=expand('')\b " 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