spacemacs/layers/+lang/swift
2015-12-03 23:34:01 -05:00
..
img Swift support initial import 2015-12-03 23:34:01 -05:00
packages.el Swift support initial import 2015-12-03 23:34:01 -05:00
README.org Swift support initial import 2015-12-03 23:34:01 -05:00

Swift contribution layer for Spacemacs

/TakeV/spacemacs/media/commit/bc20b2530006d36d777b9ff7ad8a3934dabcc058/layers/+lang/swift/img/swift.png

Description

This layer adds support for Apple's Swift programming language, used as a general purpose scripting language.

It relies on the swift-mode major-mode* for Emacs 24.4 or later, to provide the following features:

  • Syntax highlighting
  • Indentation
  • Code navigation using imenu (built-in)
  • Automatic syntax checking with flycheck (available with the syntax-checking layer)

Install

To be able to use this layer you should be able to run this from the command line:

On OS X:

  xcrun swift

Usage information

Unless configured by the user, the REPL will be invoked using the command xcrun swift.

You can launch the REPL using the keybinding SPC m s s (or C-c C-z).

The universal prefix SPC u (C-u) may be used to modify command invocation.

Key bindings

swift-mode

Emacs Evil Description
[~C-u~] C-c C-z [~SPC u~] SPC m s s swift-mode-run-repl
C-c C-f SPC m s b swift-mode-send-buffer
C-c C-r SPC m s r swift-mode-send-region

Notes:

  1. swift-mode-run-repl will run or switch to an existing REPL.
  2. To edit the command invocation, prefix with SPC u (or C-u).
  3. Emacs key bindings in use are the those set by the package.

swift-repl-mode

Emacs Evil Description
C-c C-z SPC m s s swift-repl-mode-switch-back