Reply to message «for statement with character classes», sent 05:52:36 14 June 2011, Tuesday by David Fishburn:
No, there are no such shortcuts. Nearly equivalent:
for letter in map(range(char2nr('0'), char2nr('9'))+
\range(char2nr('a'), char2nr('z'))+
\range(char2nr('A'), char2nr('Z')), 'nr2char(v:val)')
...
endfor
Why do you need this?
Original message:
> I assume there is a shortcut way to do something like this:
>
> for letter in [:alnum:]
> endfor
>
>
> E121: Undefined variable: :alnum:
> E15: Invalid expression: [:alnum:]
>
> Vim 7.3.1-142
>
> Any suggestions?
>
> Thanks,
> Dave
signature.asc
Description: This is a digitally signed message part.
