How to create a file with stan extension

Operating System: mac OS X Yosemite
Interface Version: MatlabStan 2.15.1.0
Compiler/Toolkit:

I’m a new stan user and wanna ask a very simple question: how to create a file with stan extension? Is there any IDE where I could save my text as a stan file? It’s a very naive question but I don’t know how to deal with it. Your answer will be highly appreciated. Thanks!

Any text editor or probably the Matlab file editor. Just Save As with filename my_program.stan or whatever.

The Matlab editor works, although it may default to adding .m as the extension. To avoid this, when using “Save as”, click the dropdown list next to “Format” in the dialog window, and select “All files (.)”. Then add the .stan extension to your filename.

Otherwise if you have already saved the file using the Matlab editor, and things don’t seem to be working, it’s probably because OS X is hiding the file extensions. In the Finder, go to the file and Get Info (File > Get Info, or ⌘I), uncheck Hide Extension, and remove everything after .stan in the filename.

In the Rstudio IDE, if you create a new text file, as soon as you save it with extension “.stan”, Rstudio will recognize it as such and apply Stan syntax highlighting for you.

1 Like

We (the stan devs) tend to use standalone text editors like emacs, vim, or atom. These work across application platforms. It’s a tradeoff between keeping applications like Matlab or Rstudio GUIs consistent or keeping the editor you use for everything from LaTeX to Stan consistent. I’ve been using emacs for more than 30 years, so the decision’s easy for me.

Thank you guys!!!