Holy beans, you're right Well, that's why I'm on the list... To save keystrokes :)
Thanks, Derek Entered using opposable digits... -----Original Message----- From: Ben Fritz <[email protected]> Date: Mon, 23 Mar 2009 14:03:54 To: vim_use<[email protected]> Subject: Re: Delete from cursor to next instance of a pattern On Mar 23, 1:10 pm, "Derek Wyatt" <[email protected]> wrote: > Yup, the / does that and people have been suggesting that you can use it when > you want more than one character in the search but due to what you've pointed > out, you really need to add a zero width lookahead in order to achieve what > 't' gets you. > > So if you wanted to match "<a href=" instead of "<a name=" for example then > you'd need > > d/\ze<a href= > I believe that using a / search as a motion will NOT by default include the match in the motion. A motion is all the text that the cursor MOVES OVER, so for example you get "dl" to delete just the character under the cursor. You should be safe without the zero-width lookahead. Experimentation shows me that I need to explicitly include the match in the motion, like this: d/pattern/e Which will delete from the cursor up to and including the matched text for "pattern". --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
