Hello Tom, John and Nazri, First thing first, thanks for help and inspiration.
(1) The search is done within script over a list (not in buffer), therefore, search() seems not work. (2) Yes, this patter is better: '^\(if\>\)\...@!' (3) Yes, filter() will work. Acutally, I used filter() for fuzzy match, like abc => a.*b.*c.* as a pattern. It works great. Real code can be found on line 345 of http://maxiangjiang.googlepages.com/vimim.vim.html However, I tend to believe that finding two points might be the fastest way when all I need the range between a sorted list. (Though I cannot feel the performance difference out of a list with 2k items.) This is for vimim, which works on a data file with some 40K lines. However, I found a trick to limit search range within a list of 2K (40000/26=1538) itmes/lines. Therefore, filter() might not be too bad. Sean --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
