I was wondering how it is that I would place VIMScript variable values in my regex range and also in the replacement portion of my regex?
function! GoogleFormsStep(startnum, endnum)
let x = startnum
let line = 1
while x <= endnum
line, line s/$/x/g " What do I do here?
let x = x + 1
let line = line + 1
endwhile
endfunction
:'<,'>s/$/\=line('.')/
(where'<,'>
are automatically inserted) would seem to accomplish what's in your code (if it helps somewhere).