Why is [dos] sometimes in the output of a save in "vim". such as: "foo.txt [dos] 38L, 193C"?
What flags a file as being a [dos] file?


Line endings. Windows uses CR (carrage return) and NL (newline) characters. Old Mac plain text files use CR and macOS command line editors use NL.