Hi,

epanda schrieb:
> Hi,
> 
> 
> I have done a func that I call on that way :
> 
> :%s/myPattern/\=MY_FUNC(submatch(4),submatch(5),submatch(3),submatch
> (2))/
> 
> 
> 
> I would like to not substitute the pattern, just analyse each line.
> Thanks

add \zs at the end of the search pattern and let your function return
an empty string:

  function! MY_FUNC(a, b, c, d)
      " ...
      return ''
  endfunction

  :%s/myPattern\zs/\=MY_FUNC(submatch(4),submatch(5),submatch(3),submatch(2))/

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us.     (Calvin)

-- 
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Reply via email to