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

102937Re: selecting a URL

Expand Messages
  • Matt Wozniski
    Mar 31 10:24 AM
    • 0 Attachment
      On Tue, Mar 31, 2009 at 12:23 PM, Paul wrote:
      > How would I go about making it easy for myself to select a string
      > matching a complex regex, such as a URL? Ideally I'd like to be able
      > to put my cursor into the middle of a line like
      > <a href=http://vim.wikia.com/wiki/Special:Search?
      > search=comments&go=1>search</a>

      It would be a lot easier here if this was valid XHTML, since then you
      could just use di"

      > and type "diu" and have Vim delete just the URL. And I'd like that to
      > work regardless of the context where the URL is found.
      > But a less perfectly streamlined solution would be fine too.
      > Any suggestions?

      If you're really determined to do this, you could make your own text
      object to do it (there are some examples on the wiki), but I doubt it
      would be that useful. In my experience, 99 times out of 100, URLs
      will either stand alone (in which case you could use diW) or be quoted
      (so you could use di"). I rarely something like



      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 11 messages in this topic