diff options
| author | Jacob Parker <j3parker@csclub.uwaterloo.ca> | 2012-03-25 16:26:48 -0400 |
|---|---|---|
| committer | Jacob Parker <j3parker@csclub.uwaterloo.ca> | 2012-03-25 16:26:48 -0400 |
| commit | f5c91d10dde732c56ed08244e3326c9f1a2ebc30 (patch) | |
| tree | fbaff0f52cd38a6f9b6eced5970d802b4c39df84 /src/etc/vim | |
| parent | 8462c6c83170dea3e835cfbe459406492c1413a6 (diff) | |
| download | rust-f5c91d10dde732c56ed08244e3326c9f1a2ebc30.tar.gz rust-f5c91d10dde732c56ed08244e3326c9f1a2ebc30.zip | |
Fixed vim highlighting for \' (and other) escapes in char literals
Diffstat (limited to 'src/etc/vim')
| -rw-r--r-- | src/etc/vim/syntax/rust.vim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/etc/vim/syntax/rust.vim b/src/etc/vim/syntax/rust.vim index aa3412a3813..26bb0d70417 100644 --- a/src/etc/vim/syntax/rust.vim +++ b/src/etc/vim/syntax/rust.vim @@ -46,9 +46,10 @@ syn match rustFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, without dot, with exponent syn match rustFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" -syn match rustCharacter "'[^']*'" - syn case match + +syn match rustCharacter "'\([^'\\]\|\\\(['nrt\\\"]\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'" + syn region rustComment start="/\*" end="\*/" contains=rustComment syn region rustComment start="//" skip="\\$" end="$" keepend |
