On 9/19/2011 6:18 PM, Tony Mechelynck wrote:
On 19/09/11 16:17, Ernie Rael wrote:
Suggest looking at help for 'fileformats'/'ffs' . Something like "set
fileformats=unix,dos" in your .vimrc might be what you're looking for.
-ernie
That will open correctly files whose lines are all-LF-only
(Unix-style) or all-CR+LF (Dos-style) provided in the latter case that
even the last line has a Dos-style EOF. It won't work for files with
mixed ends-of-lines (some CR+LF, others LF-only, which is what the OP
mentioned) and it will also not work on Dos-style files whose last
line lacks an EOL (i.e. Dos-style files whose last two bytes are other
than 0x0D 0x0A).
Thanks for the detailed analysis (other message) of the situation. I
discovered ":e ++ff=dos" later in the day working with a mixed CR+LF, LF
file.
Is it correct that there is no way to modify the file without looking at
the "^M" and not change the LF only line endings? I guess the "conceal"
feature is what you'd need to do.
If I open a mixed EOL file and do ":e ++ff=dos" then the file does not
become "modified". Is that a bug?
Thanks,
-ernie
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php