vim: Turn "pub" into a big asterisk for those who dislike the look of it.

This is not the default and must be turned on.
This commit is contained in:
Patrick Walton 2012-09-05 18:58:19 -07:00
parent 3a34c96086
commit 2ba632a683
2 changed files with 9 additions and 1 deletions

View File

@ -25,6 +25,13 @@ syn match rustNiceOperator "=>" contains=rustFatRightArrowHead,rustFatRightArrow
syn match rustNiceOperator /\<\@!_\(_*\>\)\@=/ conceal cchar=
" For those who don't want to see `pub`...
if exists('g:rust_conceal_pub')
syn match rustPublicSigil contained "pu" conceal cchar=
syn match rustPublicRest contained "b" conceal cchar= 
syn match rustNiceOperator "pub " contains=rustPublicSigil,rustPublicRest
endif
hi link rustNiceOperator Operator
if !exists('g:rust_conceal_mod_path')

View File

@ -14,7 +14,8 @@ syn match rustAssert "\<assert\(\w\)*"
syn keyword rustKeyword again as break
syn keyword rustKeyword const copy do drop else export extern fail
syn keyword rustKeyword for if impl import in let log
syn keyword rustKeyword loop match mod module move mut new of owned priv pub pure
syn keyword rustKeyword loop match mod module move mut new of owned priv pure
syn match rustKeyword "\<pub\>"
syn keyword rustKeyword ref return static to unchecked
syn match rustKeyword "\<unsafe\>" " Allows also matching unsafe::foo()
syn keyword rustKeyword use while with