I've got, in this case, a Perl module which has some
JSON snippets inside of it. I'd like to be able to select the embedded
JSON and format it via
jq. So far I've got:
:vnoremap jq <esc>:'<,'>:w !jq<CR>
That allows me to select some text, type
jq and then the formatted text is displayed to me. However, it's not replacing the selected text. Nothing actually changes in my buffer. What am I missing here? I've seen lots of answers for how to format an entire file, but I can't find a workable answer for this particular use case.