about summary refs log tree commit diff
path: root/src/etc/vim
diff options
context:
space:
mode:
authorJacob Parker <j3parker@csclub.uwaterloo.ca>2012-03-25 16:26:48 -0400
committerJacob Parker <j3parker@csclub.uwaterloo.ca>2012-03-25 16:26:48 -0400
commitf5c91d10dde732c56ed08244e3326c9f1a2ebc30 (patch)
treefbaff0f52cd38a6f9b6eced5970d802b4c39df84 /src/etc/vim
parent8462c6c83170dea3e835cfbe459406492c1413a6 (diff)
downloadrust-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.vim5
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