How can I add a string to the end of each line in Vim?

I want to add * to the end of each line in Vim.

I tried the code unsuccessfully

:%s/\n/*\n/g

10 Answers
10

Leave a Comment