When you press new file, the standard templates come up, but it’s a fun and easy timesaver to add your own.
Open applications
Rclick xcode->Show Package Contents
Open folder
Developer > Library > Xcode > Templates > File Templates > Multiplatform > Source
Copy an existing template (folder) to somewhere outside the current folder as you need to enter passwords a lot.
Edit the template as you like.
__FILEBASENAME__.swift is the file to edit
File Extension
You can change the file extension to whatever you like.
For example: file.sl, file.py
Syntax highlighting
If the extension is valid – syntax highlighting works.
https://en.wikipedia.org/wikiList_of_filename_extensions
File extensions are usually in lower-case. On this site they are upper-case.
Dialog box name
The folder name is the name that will be displayed in the file dialog box.
Note: If you Update Xcode…
If you update, you have to add the templates again.
They are located in: Projects2 > 11_Xcode Templates