On Friday, February 7, 2014 7:07:50 PM UTC+1, David Fishburn wrote:
> ...
>  
> 
> > FWIW I would like to be able to define text objects in terms of
> > 'syntax objects' (yes I just made that term up, I mean primarily
> > the piece of text seleced by a :syn match or :syn region as
> 
> > identified by the syntax group it is connected with). 
> 
> ...That's actually an interesting idea. I'm not sure how useful it would be 
> though. Looking at some local code files the regions with common syntax are 
> usually strings, comments or single words. All of which can be operated on 
> with default text objects.
> 
> 
> 
> 
> Do you see real world editing tasks where you would benefit from selecting 
> all text inside the current syntax region?
> 
> 
> I think a simple case might be when you are editing a HTML file.
> 
> 
> 
> You can embedded different syntax objects within it, javascript, perl, php, 
> ...
> 
> 
> Some of the html syntax files do this already.  They can highlight Javascript 
> as "javascript" and highlight the rest of the page as "html".
> 
> 
> 
> So, I might like to highlight my "javascript" code using one of these text 
> objects and hit = to format it.
> 
> 
> That was one of the first usages that came to mind to me.
> 
> 
> 
> David
>  

I agree, that sounds useful.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to