first commit
This commit is contained in:
36
syntax/c.vim
Normal file
36
syntax/c.vim
Normal file
@@ -0,0 +1,36 @@
|
||||
"========================================================
|
||||
" Highlight All Function
|
||||
"========================================================
|
||||
syn keyword cSystemCall pid_t pthread_t pthread_mutex_t pthread_cond_t sem_t fd_set libnet_t libnet_ptag_t pcap_t size_t socklen_t
|
||||
hi def link cSystemCall Type
|
||||
"========================================================
|
||||
" Highlight All Function
|
||||
"========================================================
|
||||
syn match cFunctions display"[a-zA-Z_][a-zA-Z_0-9]\{-1,}\s\{-0,}(\{1}"ms=s,me=e-1
|
||||
hi def link cFunctions Special
|
||||
"========================================================
|
||||
" Highlight All Math Operator
|
||||
"========================================================
|
||||
" C math operators
|
||||
syn match cMathOperator display "[-+/*\%=]"
|
||||
" C pointer operators
|
||||
syn match cPointerOperator display "->\|\."
|
||||
" C logical operators - boolean results
|
||||
syn match cLogicalOperator display "[!<>]=\="
|
||||
syn match cLogicalOperator display "=="
|
||||
" C bit operators
|
||||
syn match cBinaryOperator display "\(&\||\|\^\|<<\|>>\)=\="
|
||||
syn match cBinaryOperator display "\~"
|
||||
syn match cBinaryOperatorError display "\~="
|
||||
" More C logical operators - highlight in preference to binary
|
||||
syn match cLogicalOperator display "&&\|||"
|
||||
syn match cLogicalOperatorError display "\(&&\|||\)="
|
||||
|
||||
" Math Operator
|
||||
hi cMathOperator guifg=#3EFFE2
|
||||
hi cPointerOperator guifg=#3EFFE2
|
||||
hi cLogicalOperator guifg=#3EFFE2
|
||||
hi cBinaryOperator guifg=#3EFFE2
|
||||
hi cBinaryOperatorError guifg=#3EFFE2
|
||||
hi cLogicalOperator guifg=#3EFFE2
|
||||
hi cLogicalOperatorError guifg=#3EFFE2
|
||||
Reference in New Issue
Block a user