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
-~----------~----~----~----~------~----~------~--~---

Reply via email to