keith/swift.vim

Vim runtime files for Swift

Vim Script

819

211 commits

updated Sep 2, 2025

See the code

README

Swift.vim

Syntax and indent files for Swift

Features

  • Syntax highlighting for modern Swift
  • Filetype detection
  • Smart indentation
  • Compiler usage (:compiler swiftc → :make)

Examples

Installation

LazyVim

For neovim only

  1. Locate your plugins folder, make a new .lua file and name it swift.lua

  2. add the following:

return {
  "keith/swift.vim",
  ft = "swift",  -- filetype
}

The plugin should be automatically installed next time you start nvim!

[!TIP] usual location for the plugins is ~/.config/nvim/lua/plugins/)

Plug

  1. Add the folowing to your vim-plug block:
Plug 'keith/swift.vim', { 'for': 'swift' }
  1. Run :PlugInstall:

Packer

  1. Add the following to your packer config:
require('packer').startup(function(use)
  use { 'keith/swift.vim', ft = 'swift' }
end)

Usage

Opening any .swift file should automatically enable the plugin.

Commands
  • Run :compiler swiftc then :make to build current file.
swift
vim
viml

keith/swift.vim

Vim runtime files for Swift

Vim Script

819

211 commits

updated Sep 2, 2025

See the code

README

Swift.vim

Syntax and indent files for Swift

Features

  • Syntax highlighting for modern Swift
  • Filetype detection
  • Smart indentation
  • Compiler usage (:compiler swiftc → :make)

Examples

Installation

LazyVim

For neovim only

  1. Locate your plugins folder, make a new .lua file and name it swift.lua

  2. add the following:

return {
  "keith/swift.vim",
  ft = "swift",  -- filetype
}

The plugin should be automatically installed next time you start nvim!

[!TIP] usual location for the plugins is ~/.config/nvim/lua/plugins/)

Plug

  1. Add the folowing to your vim-plug block:
Plug 'keith/swift.vim', { 'for': 'swift' }
  1. Run :PlugInstall:

Packer

  1. Add the following to your packer config:
require('packer').startup(function(use)
  use { 'keith/swift.vim', ft = 'swift' }
end)

Usage

Opening any .swift file should automatically enable the plugin.

Commands
  • Run :compiler swiftc then :make to build current file.
swift
vim
viml

Project health

Overall

3.1/10

Maintained

0/10

Code review

3/10
OpenSSF Scorecard

Significant stargazers

Stephen Celis

6,172 followers · starred Oct 2015

Justin Spahr-Summers

3,846 followers · starred Mar 2015

Michael Crosby

1,660 followers · starred Mar 2023

JP Simard

2,004 followers · starred Jul 2016