On Fri, November 6, 2009 9:08 am, Wu, Yue wrote:
> It does work, thanks! A quesiton, why
>
> for val in filter(split(line), 'v:val =~ "@\\zs\\S\\+"')
>
> doesn't work?
Because you filter the list and exclude all items, that do not match the
regex. You do not change the value, so \zs does not make sense here. For
that you'd need the map function together with matchstr() or something
like this.
> I like to get a list of tagname without the prefix '@'.
replace
call add(rlist, val)
by
call add(rlist, val[1:])
regards,
Christian
--
:wq
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---