Is there a way to make \n or \r characters visible in vim? (I want to be able to see if the csv file I am looking at uses just \n or \r and \n at the end of lines.
Viewing \n and \r characters in Vim?
Asked Answered
:setl fileformat?
dos
means CR-LF (consistently; if only some lines contain both, it'll be listed as unix
, and you'll see ^M
characters at the end of those lines), unix
means LF; mac
means only CR newlines.
hmm when I ran that command it said
fileformat=dos
so that must mean CR followed by LF (\r\n) ? –
Hydrotherapeutics @leeand00: Correct. If you deal with different fileformats regularly, it may make sense to add
%{&l:fileformat}
to a custom statusline
. –
Horribly © 2022 - 2024 — McMap. All rights reserved.
\r\n
). – Abscond