Alex Rivera | Logout

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

Asked 2009-02-27T11:52:00.957
351

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

I tried the code unsuccessfully

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

1 Answer

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

Your first one is correct anywhere else, but Vim has to have different newline handling for some reason.

answered 2009-02-27T12:05:37.227

Your Answer