Select text between double quotes over multiple lines in VIM
The built in quote and double quote text object do not cross line boundaries. However you can use a search with vim's operators. e.g.
y/"<cr>
c/"<cr>FOO<esc>
d?"<cr>
The text objects that are delimited by identical characters ("
, '
) only work within a line, because otherwise it would be difficult to determine what's the right scope to select.
If you want such a multi-line text object, you have to define your own alternative. Plugins like kana/vim-textobj-user or my own CountJump plugin help you with that.
With the latter, this can be as simple as this to override the built-in i'
/ a'
/ i"
/ a"
:
call CountJump#TextObject#MakeWithCountSearch('', "'", 'ai', 'v', "'", "'")
call CountJump#TextObject#MakeWithCountSearch('', '"', 'ai', 'v', '"', '"')