Skip to content

Commit 881b2b4

Browse files
author
Max Moiseev
committed
[vim] highlighting FIXME and TODO in comments
1 parent dc65f70 commit 881b2b4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

utils/vim/syntax/swift.vim

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ syn keyword swiftBoolean true false
4545

4646
syn region swiftString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=swiftInterpolation
4747
syn region swiftInterpolation start=/\\(/ end=/)/ contained
48-
syn region swiftComment start="/\*" end="\*/" contains=swiftComment
49-
syn region swiftLineComment start="//" end="$"
48+
syn region swiftComment start="/\*" end="\*/" contains=swiftComment,swiftLineComment,swiftTodo
49+
syn region swiftLineComment start="//" end="$" contains=swiftComment,swiftTodo
5050

5151
syn match swiftDecimal /[+\-]\?\<\([0-9][0-9_]*\)\([.][0-9_]*\)\?\([eE][+\-]\?[0-9][0-9_]*\)\?\>/
5252
syn match swiftHex /[+\-]\?\<0x[0-9A-Fa-f][0-9A-Fa-f_]*\(\([.][0-9A-Fa-f_]*\)\?[pP][+\-]\?[0-9][0-9_]*\)\?\>/
@@ -64,6 +64,8 @@ syn match swiftPreproc /^#\<if\>\|^#\<endif\>/
6464

6565
syn match swiftAttribute /@\<\w\+\>/ skipwhite
6666

67+
syn keyword swiftTodo TODO FIXME contained
68+
6769
hi def link swiftImport Include
6870
hi def link swiftImportModule Title
6971
hi def link swiftImportComponent Identifier
@@ -98,5 +100,6 @@ hi def link swiftNew Operator
98100
hi def link swiftMutating Statement
99101
hi def link swiftPreproc PreCondit
100102
hi def link swiftAttribute Type
103+
hi def link swiftTodo Todo
101104

102105
let b:current_syntax = "swift"

0 commit comments

Comments
 (0)