For example, suppose I have this line of JavaScript:
console.log(
"This is a really long line that I want to format, and it is inside of a quote"
)
I'd like to select the quote line in VISUAL-LINE mode, the pres gq
to format it, but it doesn't work. The result is something like this:
console.log(
"This is a really long line that I want to
format, and it is inside of a quote"
)
but I was hoping that it would be something like this:
console.log(
"This is a really long line that I want to "+
"format, and it is inside of a quote"
)
so that the result is still a proper string.
Is it possible to do this with Vim?