Page 1 of 1

Loading xml files into the vim text editor

Posted: Sat Aug 08, 2026 4:17 pm
by kanliot2
Looking through the data files for Distant Worlds 2, just to play "harder".

I've noticed that the line endings (\r\n (CRLF) comply to windows standards, but the content doesn't. Most or all of the descriptions contain LF, but not CR.

It's not a bug, but vim text editor seems setup to freak out about this situation.

After an googling furiously for a long time, I gave up. Next day I came up with this: simply load the file inside the vim command

Code: Select all

$ vi -R -c "e ++ff=dos Resou*"  
Explanation

Code: Select all

 -R #readonly 
 -c e # edit command 
 ++ff=   # override detection of file type 
Cheers!