4

Is there a way to select everything between quotes " ' and <backtick> where the text contained between these quotes span multiple lines? vi<quote> will select everything in between the quotes but it only works on a single line. Basically, I want vi<quote> to work how vi( works which selects text spanning multiple lines and all

Use case for this is selecting a graphql query, which is wrapped around backticks, and spans multiple lines. Or selecting an entire python doc comment

If it's not predefined in vim, how can I go about writing a function for it?

Riptide
  • 141
  • 1
  • 1
    I’m guessing you’re looking for something a bit more polished than v/"<CR>hoNl? – Rich Sep 04 '22 at 08:22
  • v/"<CR>hoNl would also work. How do I use it? – Riptide Sep 04 '22 at 08:33
  • Type it in! ;). I’m sure someone will be along to write a proper answer soon, but if you can’t wait, take a look at https://vim.fandom.com/wiki/Creating_new_text_objects – Rich Sep 04 '22 at 09:26
  • v/"<CR>hoNl works pretty well (without the whole hoNl thing), but kinda breaks when it encounters an empty line. I checked out the link and that's what I tried to do first, but wasn't sure how to get to the quotes that a paragraph is wrapped in – Riptide Sep 04 '22 at 09:36

0 Answers0