In command mode you can do the following:
Don't know what your vi experience is so here's a little breakdown of that command:
The % tells vi to do the changes on all lines (you can also give a range instead 4,10 -> lines 4 to 10)
The s/^/a/ tells vi to insert an a, at the beginning of the line (the ^).
As you might have noticed this looks like the way sed does things (both use the ed command under the hood).
Also have a look here:
BTW: Don't edit your original post after an answer was given, post a new entry instead. If you don't there is a big chance your changes will not be noticed (we do get an e-mail when someone post a new entry, not when someone edits an already existing one).