Saturday, June 23, 2012

Re: visual select entire string enclosed in double quotes that contains newlines

On 23. Jun 2012, at 19:23, Paul wrote:

On Friday, 22 June, 2012 at 21:41:01 BST, Joshua Dennis wrote:
> I have tried unsuccessfully to find a way in vim to visual select an entire string enclosed in double quotes that contains new lines. Anyone know of a way to do this? (while in vim vi" is close, but it won't span new lines)

It's not entirely what you're after but the SyntaxMotion script can kind of help: http://www.vim.org/scripts/script.php?script_id=2965

Have you tried this (assuming your curser is on the first double quote): v/"<CR>
This starts visual mode and searches for the next double quote. If you have backslash-escaped double quotes in the string you can use: v/[^\\]"<CR>l
Note: Do not type the escape sequence "<CR>" but hit enter instead (type it if you want to define a mapping for this)


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment