producing zero padded incrementing numbers in vim Posted on August 9, 2010 by flamingpenguin Reply :let j=[] | %s/xxxx/\=printf(â€%04dâ€, “â€.len(add(j,â€)))/g (adapted from this tip)