Your comments

Yes, running it from within the app on your device won't be possible.
You could try to enhance the file at https://github.com/BlackBulletIV/enhanced-lua.tmbundle/blob/master/Syntaxes/Lua%20(Love).tmLanguage
Unfortunately, this seems to be a limitation of keyboard support in iOS.

Even in Pages, when I press page down on my bluetooth keyboard, it jumps to the end of the file.
I see. I'm using Sublime Text 2, so I guess this is very similar to the View -> Layout menu?

Where exactly do I find this feature in Sublime Text?
For local preview, Textastic doesn't use http but its own preview protocol (urls internally start with "preview://"). So you need to specify the http protocol since it would otherwise try to load the URL using the preview:// protocol which is only for local files.

This is very similar to the "file://" protocol for local files in desktop browsers. 
This should already work. Can you show me the code you're using?
Currently, only the $UUID variable is supported. It automatically creates a new uuid and inserts it.

I'll consider adding more variables in the future.