I'd like to be able to get the contents of a register in
nvi, such as using
b"wye to yank a word into the
w register and then invoke a shell command with the current word in it.
Currently, I have this command for running ripgrep (
rg), but it's less than ideal in a number of ways.
It basically creates a new line below the current one with an
ex command that runs the shell, deletes the new line into the
w register and then runs the register via
" run ripgrep map ^R mpb"wyeo^["wpI:!rg --color=always ^[A ^V| less -R^["wdd`p@w
Ideally, is there a way to refer to the contents of a register while typing out an ex command (similar to how
<c-r>w would work in
Alternatively, is there a way to write arbitrary content to a register without touching the file you are currently visiting?