Friday, February 7, 2014

Re: [plugin] targets.vim - adds many text objects in the spirit of Vim, including next and last text objects

On Friday, February 7, 2014 4:08:06 PM UTC+1, BPJ wrote:
> 2014-02-07 09:51, Andrew Stewart skrev:
>
> > Regarding the various mailing list threads about text objects: I think the existence of multiple plugins offering new text objects is evidence of demand for Vim to beef up its text objects. They are one of the most useful parts of Vim and enhancing this area would, I think, increase Vim's utility. I know adding features complicates everything but because text objects are so important I feel the benefits outweigh the costs.
>
>
>
> 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). To my mind
>
> they are related because a 'syntax object' can be thought of as a
>
> 'thing' in the text which you might want to do stuff to. At least
>
> I would like to be able to define objects using a
>
> command/function syntax similar to :syn region.
>
>
>
> I hope this idea isn't totally naive. I'm just a user having done
>
> some limited forays into scripting Vim, lacking deeper
>
> knowledge/understanding.
>
>
>
> /bpj

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?

--
--
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment