From ec48cdda27baf830229584df6b3695bc30b81f12 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 16 Nov 2019 14:04:47 +0100 Subject: vimrc: Add v_w mapping to search with Ripgrep We already have an n_w mapping. This new one gives us the ability to refine the search term to include more than a single word. now we can include multiple words and punctuation in searches. --- vimrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vimrc b/vimrc index 55a39af..69cd790 100644 --- a/vimrc +++ b/vimrc @@ -440,6 +440,7 @@ " " 2019.11.15: " * Add gS mapping to :ArgWrap. +" * Add v_w mapping to search a visual selection with Ripgrep. " @@ -834,6 +835,7 @@ nnoremap sp :setlocal spell! spell? " Search with Ripgrep nnoremap w :!rg +xnoremap w y:if getregtype('"') ==# 'v' \| execute '!rg --fixed-strings ' . shellescape(getreg('"')) \| endif -- cgit v1.2.3