dfabulich / choicescript

ChoiceScript is a language for developing multiple-choice games.
http://www.choiceofgames.com/blog/choicescript-intro/
Other
410 stars 123 forks source link

ChoiceScript should work with .txt and also with custom extension for sources #103

Open Enerccio opened 10 years ago

Enerccio commented 10 years ago

The reason is simple, if I want to use some editor, I would like to assign language (ChoiceScript) for that extension, but if .txt is used, I can't do that. Now, we don't want to break backwards compatibility, thus I think CS should support two extensions (.txt and .cs, maybe?).

I know, seems petty but it's quite annoying to switch to ChoiceScript language each time I open file :(

CareyJWilliams commented 10 years ago

I think for the average user, .txt will always make more sense. Messing around with file extensions is something we shouldn't expect everyone to do, but I can see no harm in this if it continues to support the .txt extension as well.

Enerccio commented 10 years ago

That would be the idea, with maybe custom extension having priority. Should be relatively easy to implement too, and it would help very much with editors and custom syntax :)

Edit: by priority I mean if there are two files with same name, one .cs (?) one .txt, .cs would be used (or error could be shown, maybe?).

Gantron1 commented 8 years ago

If there's both a .cs and .txt, it should throw an error. I suggest adding an optional command, similar to author and title that determines what extension gets used, the default being .txt.