Remove line break

In edition mode:

:%s/\n//g

In command mode: with J on each line to add the next line

J

Remove empty lines

g/^$/d

Index