I generally use %s/\n//g (or is it \r ?) rather than trying to use verbatim control characters.
this post was submitted on 02 Jan 2024
11 points (92.3% liked)
Neovim
2161 readers
3 users here now
founded 1 year ago
MODERATORS
Next time, try enabling display of whitespace characters through set list
. If I remember correctly, they can help distinguish between the Windows carriage return character and Linux end of line character.
This may help for a quick overview.
Vim (and presumably neovim) will detect that it's in "DOS mode" and hide the '^M's for you. In vim you can just do ":set ff=unix" and then save.