From 1aa62662000b2adfaa125e66a9d25e1cbd3836a3 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Fri, 21 Oct 2022 00:36:50 +0200 Subject: [PATCH] vim:keys: Fix `*` for words starting w/ b `` inserts the cword, but skips over any character that were already typed. This broke the search for words beginning with a `b`. --- .config/vim/vimrc.d/40-keys.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/vim/vimrc.d/40-keys.vim b/.config/vim/vimrc.d/40-keys.vim index a0dd544..f8f3df3 100644 --- a/.config/vim/vimrc.d/40-keys.vim +++ b/.config/vim/vimrc.d/40-keys.vim @@ -92,7 +92,7 @@ vnoremap * y/\V=escape(@",'/\') vnoremap # y?\V=escape(@",'?\') " Use ripgrep as search-engine for `*` -nmap * :Rg \b\b +nmap * :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