Use txt extension for text documents
When implementing #977, also rename the content files to .txt. The current extension, .nwd was mostly there to obscure the format, but it doesn't really do that (see #1960) and .txt is technically more correct. The build format is also .txt now.
This would require a major file format version bump, so it is best to combine all of the changes in one big format conversion.
Switching from .nwd to .txt will break the git diff continuum, won't it? For this reason I would prefer a user-controlled setting that converts .nwd to .txt only if the user wants to, or maybe in combination with auto-detect as to which extension the files currently use. New projects and/or freshly installed novelWriters may default to .txt.
Switching from
.nwdto.txtwill break the git diff continuum, won't it?
No, git is perfectly capable of handling file renames as long as the content is the same.
For this reason I would prefer a user-controlled setting that converts
.nwdto.txtonly if the user wants to, or maybe in combination with auto-detect as to which extension the files currently use.
How the project is structured changes from time to time. This is a continuous process depending on in-app changes. The user shouldn't be concerned with the project file structure at all. Version control is designed to handle changes, so that's a non-issue.
New projects and/or freshly installed novelWriters may default to
.txt.
It's either all or nothing. Maintaining multiple structures is asking for trouble.
I've decided to implement this as a part of #977, and do a major version bump on the file format to 2.0. It's a good opportunity to redesign the project format and convert the project file to JSON and rename the content files to .txt and let it all be handled by a one-time, one-way conversion.
I'm wondering if .md might be better than .txt. It's often associated with markdown text.
This would allow to set up a text converter in git config for .md files, for example to insert newlines between sentences to improve overall git diff output.
They are not Markdown files.