Hello,

I'm trying to write my first vim-plugin, but I got stucked.

I managed to execute an external command, which gives me back a list of
filenames.
One filename per line.

For each of the filenames I want to execute another command. 
I tried it with code:

let line=getline(".")
while (strlen(line)!=0)
  "do sth. here -- construct the external command and so on
  j
  let line=getline(".")
endwhile

When I execute the code, it runns into an infinite loop, because the
lines are joined together with each loop

file:
text1.txt
text2.txt
text3.txt

after interrupting the loop the looks like
text1.txt text2.txt text3.txt

it seems j is interpreted as a J (join line) here.
And by the way, I think this is a bad solution anyway. 
Can someone give me a hint how to do it in a clean way?

Reply via email to