On Thursday, November 14, 2013 6:31:12 AM UTC-5, Daniel "paradigm" Thau wrote:
> On Wednesday, November 13, 2013 11:29:18 PM UTC-5, Bram Moolenaar wrote:
> > Daniel Thau wrote:
> > 
> > 
> > 
> > > Attached is a patch to add an 'autotextobject' setting which will treat
> > 
> > > undefined text-objects like quote text objects, using the provided
> > 
> > > character as bounds.  For example, with this setting if a user enters
> > 
> > > "di," with the cursor between two commas, the text between the commas
> > 
> > > will be removed.  This is very useful for editing lists.  Similarly, if
> > 
> > > one is composing TeX being able to quickly operate on the area between
> > 
> > > dollar signs is useful.  If one is editing snake_case_variables, being
> > 
> > > able to do a quick "ci_" is also nice.  The key here is that it happens
> > 
> > > on-the-fly with all as-of-yet-undefined objects without requiring the
> > 
> > > user consider every possible character he/she would be interested in
> > 
> > > ahead of time.
> > 
> > > 
> > 
> > > Outside of documentation and adding the setting itself, the it is only a
> > 
> > > few additional lines of code.
> > 
> > > 
> > 
> > > I've wanted this feature for a while; if there is anything else I should
> > 
> > > do to help get it upstreamed do let me know and I'll see what I can do.
> > 
> > 
> > 
> > The problem is that this only works for characters that are not taken
> > 
> > yet.  Thus if we add another text-object type the behavior changes.
> > 
> > It's like reserving all remaining characters to use for this feature.
> > 
> > 
> > 
> > I don't think this can be done properly without adding another
> > 
> > character, thus making the text selection a three-character operation.
> > 
> > 
> > 
> > -- 
> > 
> > Looking at Perl through Lisp glasses, Perl looks atrocious.
> > 
> > 
> > 
> >  /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
> > 
> > ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> > 
> > \\\  an exciting new programming language -- http://www.Zimbu.org        ///
> > 
> >  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
> 
> My hope was that we could simply add a disclaimer saying that these are not 
> reserved and any new text object added in the future would take precident 
> over these.  My patch includes some wording along those lines in the 
> documentation.  If that is not acceptable, but making this a three-character 
> option is, I'll be happy alter it accordingly.

As an alternative to a three-character option, it doesn't look like "I" or "A" 
do anything in operator-pending (but they do in visual mode).  Perhaps would 
could utilize those for catch-all text-objects (and limit it to only working in 
operator-pending)?

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui