Daniel Thau wrote: > Attached is a patch (in both the unified and context formats) to make > the discussed "am/im" text-object.
> *** a/runtime/doc/motion.txt > --- b/runtime/doc/motion.txt > *************** > *** 662,667 **** i` *v_i`* > *i`* > --- 662,687 ---- > Special case: With a count of 2 the quotes are > included, but no extra white space as with a"/a'/a`. > > + am{char} *v_am* *am* > + "a matched {char}". Selects the text from the > + previous {char} until the next {char}. > + Only works within one line. > + When the cursor starts on a {char}, Vim will figure > + out which {char} pairs are desired by searching from > + the start of the line. > + Any trailing white space is included, unless there is > + none, then leading white space is included. > + When used in Visual mode it is made characterwise. > + Repeating this object in Visual mode another > + {char}..{char} range is included. A count is > + currently not used. > + > + im{char} *v_im* *im* > + Like am{char} but exclude the {char} and > + repeating won't extend the Visual selection. > + Special case: With a count of 2 the quotes are > + included, but no extra white space as with am{char}. > + I'm sure users will ask about a multi-line implementation. This requires defining how Vim decides whether a matching {char} is the start or the end, but otherwise it should work. -- BEDEVERE: And that, my lord, is how we know the Earth to be banana-shaped. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 /// -- -- 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.