From 1d2cdf7aeafb30a2d59795c6f19c194d91e0e4c6 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Wed, 12 Oct 2022 12:37:17 +0200 Subject: [PATCH] vim:keys: Use word boundaries with `*` Ripgrep supports word boundaries, may as well use them to act closer to `*` (:h star). --- .config/vim/vimrc.d/40-keys.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/vim/vimrc.d/40-keys.vim b/.config/vim/vimrc.d/40-keys.vim index 5858550..1053cef 100644 --- a/.config/vim/vimrc.d/40-keys.vim +++ b/.config/vim/vimrc.d/40-keys.vim @@ -91,7 +91,8 @@ endif vnoremap * y/\V=escape(@",'/\') vnoremap # y?\V=escape(@",'?\') -nmap * :Rg +" Use ripgrep as search-engine for `*` +nmap * :Rg \b\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