/$/,/g add to end of every line
:%s/$/,/ will add a comma
(vim) do a subset of lines instead of the whole file, specify them in place of the %.
One way is to do a visual select and then type the :. It will fill in :'<,'> for you, then you type the rest of it (Notice you only need to add s/$/,/)