Skip to content

Commit f5c91d1

Browse files
committed
Fixed vim highlighting for \' (and other) escapes in char literals
1 parent 8462c6c commit f5c91d1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/etc/vim/syntax/rust.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ syn match rustFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
4646
"floating point number, without dot, with exponent
4747
syn match rustFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>"
4848

49-
syn match rustCharacter "'[^']*'"
50-
5149
syn case match
50+
51+
syn match rustCharacter "'\([^'\\]\|\\\(['nrt\\\"]\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'"
52+
5253
syn region rustComment start="/\*" end="\*/" contains=rustComment
5354
syn region rustComment start="//" skip="\\$" end="$" keepend
5455

0 commit comments

Comments
 (0)