I noticed that if I have a quoted string which contains one new line character I can't use the text objects i and a anymore. For example if I have:This is some text which is less than 80 character and this is a quoted stringwhich contains a line breakWhen my cursor is on the word string using va will not work.This behavior is consistent with what :h aquote says:Only works within one line.My questions are: Is there a built-in text object which would have the same behavior as a but accepting breakline?If not is there a plugin which implement it? (I didn't find a relevant one)If not is there a good reason which makes that is hasn't been implemented?
How to keep a text object a when it contains a breakline?
cursor motions
Thinking of a reason why Vim doesn't have this by default ...At least in VimL and C/C++, to have a string span multiple lines, you can't really have an opening delimiter on a line, and just the ending one on another. this is a quoted string is an end-of-line comment in vimscript, not an unfinished string. For example, with C, you have to use something like:printf(first very long line        second line, in code );So, briefly put, a multiline string (quote, text lines, quote) is not necessarily a valid multiline string.I agree it can be useful for other filetypes (text, markdown). Even though, for text, perhaps you'd want to use a typographic quotes solution?To complement FDinoff's comment/solution of using vim-textobj-quotes: if your filetype has syntax support, and the multiline quoted string appears as a separate syntax item, you  can select the whole block using Kana's syntax text object. In the above example, both strings will be selected at once, when using something like viy or vay with cursor inside any of them.I like the syntax-based approach because it's not limited to multiline strings: I can very well select an entire multiline comment in exactly the same way. And I'm also pretty sure the selection is a valid one.