Files
dotfiles/.config/vim
Julian Prein 1d58eb729d vim:keys: Add <leader>* vmap to ripgrep selection
Similar to <leader>* in normal mode, set the search pattern to the
visual selection and start a ripgrep search.

To not mess up the commandline, potential quotes that are the same as
the ones used around the string need to be escaped. As this is only
possible with double quotes, a second layer of backslash escaping is
needed as well.

Because of that, **before** escaping backslashes and double quotes, all
backslashes need to be escaped a second time. The other way around would
result in two backslashes in front of each double quote, which would
miss the whole point entirely.

In addition GetVisualSelection needed to be expanded to first reselect
the visual selection for it to work in the new mapping.
2023-02-15 14:26:05 +01:00
..
2022-08-25 04:27:51 +02:00