Skip to content

Instantly share code, notes, and snippets.

@lf-araujo
Last active March 31, 2019 10:35
Show Gist options
  • Save lf-araujo/2507272162185d3b02483e60378e81bf to your computer and use it in GitHub Desktop.
Save lf-araujo/2507272162185d3b02483e60378e81bf to your computer and use it in GitHub Desktop.
Building a Swift Project in SublimeText

Building a Swift Project in SublimeText

Sublimetext is an expansible document editor that I use for most of my projects. It can become a complete IDE, provided one installs extensions to it. Here is a way of building Swift Programming Language projects with it.

In Tools > Building System > New Building System one can create new building instructions. Paste the following:

{
"cmd": ["swift","build"],
"working_dir":"${project_path:${folder}}",
"variants":
[
	{
      "name": "Run",
      "cmd": ["swift","run"],
    },
	{
      "name": "Marathon run",
      "cmd": ["marathon","run","${file}"],
    },
]
}

And save it as swift.sublime-build. Now, whenever one opts to build the project with Ctrl+B, it will run swift build in the project's parent directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment