On Fri, Nov 06, 2009 at 08:15:16AM +0100, Christian Brabandt wrote:
>
> fu! <SID>GetCat()
> let tlist=[]
> let rlist=[]
> :g/@\S\+/call add(tlist, getline('.'))
> for line in tlist
> for val in filter(split(line), 'v:val =~ "@\\S\\+"')
> if index(rlist, val) == -1
> call add(rlist, val)
> endif
> endfor
> endfor
> return rlist
> endfu
It does work, thanks! A quesiton, why
for val in filter(split(line), 'v:val =~ "@\\zs\\S\\+"')
doesn't work? I like to get a list of tagname without the prefix '@'.
--
Hi,
Wu, Yue
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---