Search code examples
vim

How can I do something like "for char in string" in Vim script?


I've come up with this, but is there simple way I'm missing?

for s:char in split(s:string, '.\zs\ze.')

Solution

  • The canonical way is

    for s:item in split(s:mylist, '\zs')