vim:keys: Use word boundaries with <leader>*

Ripgrep supports word boundaries, may as well use them to act closer to
`*` (:h star).
This commit is contained in:
2022-10-12 12:37:17 +02:00
parent f7c43d5044
commit 1d2cdf7aea

View File

@@ -91,7 +91,8 @@ endif
vnoremap * y/\V<C-R>=escape(@",'/\')<CR><CR>
vnoremap # y?\V<C-R>=escape(@",'?\')<CR><CR>
nmap <leader>* :Rg <C-R><C-W><CR>
" Use ripgrep as search-engine for `*`
nmap <leader>* :Rg \b<C-R><C-W>\b<CR>
" 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