Vim runtime files for Swift
Last updated Jul 6, 2026
821
Stars
44
Forks
22
Issues
0
Stars/day
Attention Score
62
Language breakdown
Vim Script 67.3%
Swift 31.9%
Shell 0.7%
โธ Files
click to expand
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
- Locate your plugins folder, make a new
.luafile and name itswift.lua
- 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
- Add the folowing to your vim-plug block:
Plug 'keith/swift.vim', { 'for': 'swift' }
- Run
:PlugInstall:
Packer
- 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 swiftcthen:maketo build current file.
๐ More in this category