On Saturday, June 23, 2012 2:04:59 PM UTC-4, Lucas Hoffmann wrote:
> 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)
Yes, this works! Thank you. I never thought to go about it that way.
--
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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment