vim:keys: Fix <leader>* for words starting w/ b

`<C-R><C-W>` inserts the cword, but skips over any character that were
already typed. This broke the search for words beginning with a `b`.
This commit is contained in:
2022-10-21 00:36:50 +02:00
parent 298b205aa9
commit 1aa6266200

View File

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