Skip to content

Vim syntax #2738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 27, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 35 additions & 2 deletions utils/vim/syntax/swift.vim
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,41 @@ syn keyword swiftImport import skipwhite nextgroup=swiftImportModule
syn match swiftImportModule /\<[A-Za-z_][A-Za-z_0-9]*\>/ contained nextgroup=swiftImportComponent
syn match swiftImportComponent /\.\<[A-Za-z_][A-Za-z_0-9]*\>/ contained nextgroup=swiftImportComponent

syn keyword swiftKeyword break case continue default do else for guard if in static switch repeat return where while public internal private mutating nonmutating var let typealias protocol extension skipwhite
syn keyword swiftKeyword associatedtype override required convenience final defer skipwhite
syn keyword swiftKeyword
\ associatedtype
\ break
\ case
\ catch
\ continue
\ convenience
\ default
\ defer
\ do
\ else
\ extension
\ final
\ for
\ guard
\ if
\ in
\ internal
\ let
\ mutating
\ nonmutating
\ override
\ private
\ protocol
\ public
\ repeat
\ required
\ return
\ static
\ switch
\ try
\ typealias
\ var
\ where
\ while

syn keyword swiftTypeDefinition class extension protocol struct typealias enum skipwhite nextgroup=swiftTypeName
syn region swiftTypeAttributes start="\[" end="\]" skipwhite contained nextgroup=swiftTypeName
Expand Down