Monday, January 25, 2010

Re: search for absent strings

> I actually tried that command in vim, but got the message:
> E15: Invalid expression: let lst=[] | for i in range(1,10)| if
> (!search('xx'.i.'\>')) | call add(lst, i) | endif | endfor

Which version of Vim are you using? The List data-structure
wasn't added until Vim7 and I don't know when the range() and/or
add() functions were added (whether at the same time as that
release, or in a subsequent point release or patch). I'm running
7.2 on Debian.

> Also, for my case should I not be doing: range(1,1183) ??

Yes...sorry...I thought I caught that when I copied from my
testing vim session where I did 10 of them. Guess I didn't :-S

-tim


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

No comments: