diff options
| author | Ben Blum <bblum@andrew.cmu.edu> | 2012-06-28 18:11:54 -0400 |
|---|---|---|
| committer | Ben Blum <bblum@andrew.cmu.edu> | 2012-06-28 18:11:54 -0400 |
| commit | 571d866c0d57ace7d9f9fd8ec04ae4be4009c76c (patch) | |
| tree | 3ee9cd3ee62311956028aeeae59ddf752c9d48ef /src/etc/vim/syntax/rust.vim | |
| parent | 54713afa20a9e3cb09ffe678aeb7d32630ef7b59 (diff) | |
Update vim mode for asserts and #[attributes]
Diffstat (limited to 'src/etc/vim/syntax/rust.vim')
| -rw-r--r-- | src/etc/vim/syntax/rust.vim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/etc/vim/syntax/rust.vim b/src/etc/vim/syntax/rust.vim index 7c339ed0856..8efbc2dbaa8 100644 --- a/src/etc/vim/syntax/rust.vim +++ b/src/etc/vim/syntax/rust.vim @@ -14,7 +14,8 @@ if !exists("main_syntax") let main_syntax='rust' endif -syn keyword rustKeyword alt as assert break +syn keyword rustAssert assert +syn keyword rustKeyword alt as break syn keyword rustKeyword check claim cont const copy else export extern fail syn keyword rustKeyword for if impl import in let log syn keyword rustKeyword loop mod mut of pure @@ -39,6 +40,8 @@ syn match rustItemPath "\(\w\|::\)\+" syn region rustString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ +syn region rustAttribute start="#\[" end="\]" contains=rustString + " Number literals syn match rustNumber display "\<[0-9][0-9_]*\>" syn match rustNumber display "\<[0-9][0-9_]*\(u\|u8\|u16\|u32\|u64\)\>" @@ -69,11 +72,13 @@ syn keyword rustTodo TODO FIXME XXX NB hi def link rustHexNumber rustNumber hi def link rustBinNumber rustNumber +" Recommend changing rustAssert to something else - I use ctermfg=yellow. hi def link rustString String hi def link rustCharacter Character hi def link rustNumber Number hi def link rustBoolean Boolean hi def link rustFloat Float +hi def link rustAssert Keyword hi def link rustKeyword Keyword hi def link rustIdentifier Identifier hi def link rustFuncName Function @@ -81,6 +86,7 @@ hi def link rustComment Comment hi def link rustMacro Macro hi def link rustType Type hi def link rustTodo Todo +hi def link rustAttribute PreProc syn sync minlines=200 syn sync maxlines=500 |
