Loading ...
Sorry, an error occurred while loading the content.

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

Expand Messages
  • Christian Wellenbrock
    Feb 7, 2014
    • 0 Attachment
      On Friday, February 7, 2014 5:44:25 PM UTC+1, glts wrote:
      > On Thursday, February 6, 2014 10:43:44 PM UTC+1, Christian Wellenbrock wrote:
      > > This is my first Vim plugin and I would appreciate some honest feedback. Let me know what you think! :)
      > >
      > > https://github.com/wellle/targets.vim
      >
      > Nice work! You have great attention to detail. Dealing with all corner
      > cases is painful, I can say that because I struggled a lot with corner
      > cases in textobj-comment.
      >
      > Speaking of which: I like your 'seeking' idea, and I wonder if it could
      > be used in other custom text objects, too. For example, "dac" deletes a
      > comment, "danc" deletes a following comment, "daNc" deletes a preceding
      > comment, ... (I would use "N" not "l" to go in the other direction.)
      >
      > Probably a lot of work to implement, though.
      >
      >
      > --
      > David

      Thank you!

      You might want to take a look at how `seek`, `next` and `nextp` are implemented [1]. It's basically just moving into the range of where the normal text object would work before invoking that text object. Depending on how `textobj-comment` is implemented this could be a pretty straight forward addition.

      [1] https://github.com/wellle/targets.vim/blob/master/autoload/targets.vim

      --
      --
      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@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 13 messages in this topic