Skip to content

Added as and move keywords to Vim syntax file #18782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/etc/vim/syntax/rust.vim
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ syn keyword rustConditional match if else
syn keyword rustOperator as

syn match rustAssert "\<assert\(\w\)*!" contained
syn match rustFail "\<fail\(\w\)*!" contained
syn match rustPanic "\<panic\(\w\)*!" contained
syn keyword rustKeyword break
syn keyword rustKeyword box nextgroup=rustBoxPlacement skipwhite skipempty
syn keyword rustKeyword continue
syn keyword rustKeyword extern nextgroup=rustExternCrate,rustObsoleteExternMod skipwhite skipempty
syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite skipempty
syn keyword rustKeyword for in if impl let
syn keyword rustKeyword for in if impl let move
syn keyword rustKeyword loop once proc pub
syn keyword rustKeyword return super
syn keyword rustKeyword unsafe virtual where while
Expand Down Expand Up @@ -151,8 +151,8 @@ syn match rustSigil display /[&~@*][^)= \t\r\n]/he=e-1,me=e-1
" Last, because the & in && isn't a sigil
syn match rustOperator display "&&\|||"

syn match rustMacro '\w\(\w\)*!' contains=rustAssert,rustFail
syn match rustMacro '#\w\(\w\)*' contains=rustAssert,rustFail
syn match rustMacro '\w\(\w\)*!' contains=rustAssert,rustPanic
syn match rustMacro '#\w\(\w\)*' contains=rustAssert,rustPanic

syn match rustEscapeError display contained /\\./
syn match rustEscape display contained /\\\([nrt0\\'"]\|x\x\{2}\)/
Expand Down Expand Up @@ -263,7 +263,7 @@ hi def link rustCommentLineDoc SpecialComment
hi def link rustCommentBlock rustCommentLine
hi def link rustCommentBlockDoc rustCommentLineDoc
hi def link rustAssert PreCondit
hi def link rustFail PreCondit
hi def link rustPanic PreCondit
hi def link rustMacro Macro
hi def link rustType Type
hi def link rustTodo Todo
Expand All @@ -282,7 +282,7 @@ hi def link rustBoxPlacementExpr rustKeyword
" hi rustAttribute ctermfg=cyan
" hi rustDeriving ctermfg=cyan
" hi rustAssert ctermfg=yellow
" hi rustFail ctermfg=red
" hi rustPanic ctermfg=red
" hi rustMacro ctermfg=magenta

syn sync minlines=200
Expand Down