On Fri, Nov 06, 2009 at 09:19:05AM +0100, Christian Brabandt wrote: > > 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:]) >
Hi Brabandt! I didn't realize that a string can be implemented with the index [], now it works like a charm, thank you! -- Hi, Wu, Yue --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
