Richard Hart

Head of Something @ Somewhere
Kent, UK

My Music
My Photos

LinkedIn
Mastodon

Vim – Join lines that end with a ^M (DOS carriage return)

Editing a CSV file which split whenever there was a DOS carriage return (^M). Joining up the lines was as simple as using the command below. To get the ^M char you use CTRL+V CTRL+M (don’t let go of CTRL in-between).


  :g/^M$/normal J