diff options
author | Teddy Wing | 2019-11-16 14:04:47 +0100 |
---|---|---|
committer | Teddy Wing | 2019-11-18 23:20:31 +0100 |
commit | ec48cdda27baf830229584df6b3695bc30b81f12 (patch) | |
tree | b4fce3c94a906c8069f669df42c6a66712d94dd6 /vimrc | |
parent | f349067741bf1bc1057a0caf1daa1297fdf3102e (diff) | |
download | dotvim-ec48cdda27baf830229584df6b3695bc30b81f12.tar.bz2 |
vimrc: Add v_<leader>w mapping to search with Ripgrep
We already have an n_<leader>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.
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -440,6 +440,7 @@ " " 2019.11.15: " * Add gS mapping to :ArgWrap. +" * Add v_<leader>w mapping to search a visual selection with Ripgrep. " @@ -834,6 +835,7 @@ nnoremap <leader>sp :setlocal spell! spell?<cr> " Search <cword> with Ripgrep nnoremap <leader>w :!rg <cword><cr> +xnoremap <leader>w y:if getregtype('"') ==# 'v' \| execute '!rg --fixed-strings ' . shellescape(getreg('"')) \| endif<cr> |