Loading xml files into the vim text editor

Please post here for questions and discussion about data, event, art and sound modding and the game editor for Distant Worlds.

Moderator: MOD_DW2

Post Reply
kanliot2
Posts: 24
Joined: Sun Sep 21, 2025 12:50 pm

Loading xml files into the vim text editor

Post 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!
Post Reply

Return to “Design and Modding”