+10
Started

Swift syntax highlighting

Alexander Blach (Developer) 10 years ago updated by Richiwalt 4 years ago 8

Answer

+3
PINNED
Under review
There is now a basic syntax definition for Swift available for Textastic:

This is a repackaged version of the Sublime Text package for the Swift programming language that you can find at github.com/quiqueg/Swift-Sublime-Package.

Installation

Instructions for the iPad and iPhone version of Textastic:

  • Create a folder called #Textastic under Local Files if it doesn't exist. If it is named correctly, it will have a special folder icon with a gear symbol.
  • Open this link in Safari on your iOS device: http://www.textasticapp.com/support/Swift.tmbundle.zip
  • Select "Open In" and choose "Open in Textastic".
  • When Textastic asks if you want to unpack the file Swift.tmbundle.zip, select Yes.
  • There should now be a folder Swift.tmbundle under Local Files. If you can't see this folder, pull the file listing down to refresh it.
  • Move the folder Swift.tmbundle to the #Textastic folder you created above. You can do this with the "Edit" button - see How can I move, copy and rename files and folders?
  • Restart Textastic.
  • After you start the app, the Swift syntax definition can be chosen in the File Properties popover. It will be used automatically for .swift files.
Congratulations! You can now view Apple's Swift sample code right on your iOS device.

For more detailed installation information with screenshots, please have a look at the installation instructions in Textastic's manual:


Screenshot


+3
PINNED
Under review
There is now a basic syntax definition for Swift available for Textastic:

This is a repackaged version of the Sublime Text package for the Swift programming language that you can find at github.com/quiqueg/Swift-Sublime-Package.

Installation

Instructions for the iPad and iPhone version of Textastic:

  • Create a folder called #Textastic under Local Files if it doesn't exist. If it is named correctly, it will have a special folder icon with a gear symbol.
  • Open this link in Safari on your iOS device: http://www.textasticapp.com/support/Swift.tmbundle.zip
  • Select "Open In" and choose "Open in Textastic".
  • When Textastic asks if you want to unpack the file Swift.tmbundle.zip, select Yes.
  • There should now be a folder Swift.tmbundle under Local Files. If you can't see this folder, pull the file listing down to refresh it.
  • Move the folder Swift.tmbundle to the #Textastic folder you created above. You can do this with the "Edit" button - see How can I move, copy and rename files and folders?
  • Restart Textastic.
  • After you start the app, the Swift syntax definition can be chosen in the File Properties popover. It will be used automatically for .swift files.
Congratulations! You can now view Apple's Swift sample code right on your iOS device.

For more detailed installation information with screenshots, please have a look at the installation instructions in Textastic's manual:


Screenshot


2014-06-17: Updated to latest version.
Hi. I'm really sorry but I'm a completely novice in programming. The question is: why the text included in code is shown when I push the Run button (glasses)? For example I run Appdelegate.swift file... How can I start? Is it possible to write code and see a result in Textastic directly? Thanks in advance.
You cannot run Swift code on your iPad using Textastic. The preview (glasses) button opens a web view and allows you to preview HTML (Javascript, CSS) and Markdown files.

Is there any way to run swift code in the preview like IBM is doing with there online swift project Now that most parts of swift are open source or is this not possible?

wondering why the syntax highlighting for Swift is skipping so many keywords.  Swift syntax highlighting looks pretty bare.