From 647a022782ae17164bbe4c2d835f4eee42d253ff Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Wed, 15 Feb 2023 10:52:06 +0100 Subject: [PATCH] vim:keys: Group together `*` mappings in the code --- .config/vim/vimrc.d/40-keys.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/vim/vimrc.d/40-keys.vim b/.config/vim/vimrc.d/40-keys.vim index c5a08db..227c861 100644 --- a/.config/vim/vimrc.d/40-keys.vim +++ b/.config/vim/vimrc.d/40-keys.vim @@ -91,14 +91,14 @@ endif vnoremap * y/\V=escape(@",'/\') vnoremap # y?\V=escape(@",'?\') -" Search inside visual selection -noremap v/ /\%V - " Extended `*`. Starts vim search (without jump) and ripgrep search for cword nmap * :let @/ = '\<' . expand('') . '\>' \ set hlsearch \ Rg \b=expand('')\b +" Search inside visual selection +noremap v/ /\%V + " 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 nnoremap gp '`[' . strpart(getregtype(), 0, 1) . '`]'