Thanks for your feedback! One major difference with the built-in text objects is that this plugin provides a single text object that handles three types of quotes in a unified way, i.e., with a single key binding.
Another difference is that this plugin supports multiple lines, for example: Before: some |text "this is a multiline string" After diq: some text "|" And you are right, as in examples 3 and 6 it can jump back, which the built-in text objects don't support. Please let me know if you think there are other interesting use cases :) Cheers, Anton On Saturday, 12 April 2014 07:21:46 UTC+10, aRkadeFR wrote: > Hello, > > > > IMHO a bit unnecessary with the builtin possible motions. > > > > I use lots of : > > di' > > da' > > etc. > > > > The only benefits would be your the example 3 and 5 on which I would need to > > do two successive commands. > > > > Am I right or there others benefits I haven't noticed? > > > > Thanks anyway for the plugin and the share on the mailing list :) > > > > > > On Fri, Apr 11, 2014 at 02:13:32AM -0700, Anton Beloglazov wrote: > > > Hi All, > > > > > > I'm happy to announce a new plugin: vim-textobj-quotes - text objects for > > the closest pairs of quotes of any type. > > > > > > https://github.com/beloglazov/vim-textobj-quotes > > > > > > Using only `iq` or `aq` it allows you to operate on the content of single > > ('), double ("), or back (`) quotes that currently surround the cursor, are > > in front of the cursor, or behind (in that order of preference). In other > > words, it jumps forward or backwards when needed to reach the quotes. > > > > > > It's easier to understand by looking at examples (the cursor is shown with > > |): > > > > > > 1. Before: foo '1, |2, 3' bar; after pressing diq: foo '|' bar > > > 2. Before: foo| '1, 2, 3' bar; after pressing diq: foo '|' bar > > > 3. Before: foo '1, 2, 3' |bar; after pressing diq: foo '|' bar > > > 4. Before: foo '1, |2, 3' bar; after pressing daq: foo | bar > > > 5. Before: foo| '1, 2, 3' bar; after pressing daq: foo | bar > > > 6. Before: foo '1, 2, 3' |bar; after pressing daq: foo | bar > > > > > > The examples above are given for single quotes, the plugin works exactly > > the same way for double (") and back (`) quotes. > > > > > > Please let me know if you find any bugs :) > > > > > > Cheers, > > > Anton Beloglazov > > > > > > -- > > > -- > > > 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/d/optout. -- -- 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/d/optout.
