Cleanup C/C++ syntax files

This commit is contained in:
Kenneth Benzie 2016-12-29 20:55:47 +00:00
parent cc24665e0d
commit c334d1b47a
2 changed files with 6 additions and 14 deletions

View File

@ -1,12 +1,10 @@
" Language: C " Language: C
" Description: Additional C syntax file. " Description: Additional C syntax file.
" Author: Kenneth Benzie (Benie) <k.benzie83@gmail.com>
" Last Modified: September 04, 2016
if !exists('c_no_function') if !exists('c_no_function')
" Match function expressions: expr() " Match function expressions: expr()
" ^^^^ " ^^^^
syn match cFunction '\a\w*\ze\s*(' display syn match cFunction '\h\w*\ze\s*(' display
hi default link cFunction Function hi default link cFunction Function
endif endif
@ -52,7 +50,7 @@ if exists('g:c_doxygen') && g:c_doxygen
" Match: `markdown monospace` " Match: `markdown monospace`
" ^^^^^^^^^^^^^^^^^^^^ " ^^^^^^^^^^^^^^^^^^^^
syn region cDoxygenSpecial start='`' end='`' contained contains=@NoSpell,cDoxygenLeader display syn region cDoxygenSpecial start='`' end='`' contained contains=@NoSpell,cDoxygenLeader
" Match: @brief Description. @return Description. " Match: @brief Description. @return Description.
" ^^^^^^^^^^^^ ^^^^^^^^^^^^ " ^^^^^^^^^^^^ ^^^^^^^^^^^^

View File

@ -1,7 +1,5 @@
" Language: C++ " Language: C++
" Description: " Description: Override default C++ syntax file.
" Current Maintainer: Kenneth Benzie (Benie) <k.benzie83@gmail.com>
" Created: December 23, 2016
" Quit when a syntax file was already loaded " Quit when a syntax file was already loaded
if exists('b:current_syntax') if exists('b:current_syntax')
@ -15,7 +13,6 @@ let b:c_no_cformat = 1
let b:c_no_c11 = 1 let b:c_no_c11 = 1
let b:c_no_ansi = 1 let b:c_no_ansi = 1
let b:c_no_bsd = 1 let b:c_no_bsd = 1
let b:c_gnu = 0
let b:c_no_operators = 1 let b:c_no_operators = 1
" Read the C syntax to start with " Read the C syntax to start with
@ -28,8 +25,7 @@ syn keyword cppAccess public protected private
syn keyword cppModifier inline virtual explicit export syn keyword cppModifier inline virtual explicit export
syn keyword cppType bool wchar_t syn keyword cppType bool wchar_t
syn keyword cppExceptions throw try catch syn keyword cppExceptions throw try catch
syn keyword cppOperator new delete typeid and bitor or xor compl bitand and_eq syn keyword cppOperator new delete typeid and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq
\ or_eq xor_eq not not_eq
if exists('c_no_operators') if exists('c_no_operators')
syn keyword cppOperator operator syn keyword cppOperator operator
endif endif
@ -73,7 +69,7 @@ if !exists('cpp_no_delimiters')
" Match: label: as a Label and public: protected: private: as a Statement " Match: label: as a Label and public: protected: private: as a Statement
" ^^^^^ ^^^^^^ ^^^^^^^^^ ^^^^^^^ " ^^^^^ ^^^^^^ ^^^^^^^^^ ^^^^^^^
syn match cUserCont "^\s*\I\i*\s*:$" contains=cppAccess display syn match cUserCont "^\s*\I\i*\s*:$" contains=cUserLabel,cppAccess display
hi default link cppDelimiter cDelimiter hi default link cppDelimiter cDelimiter
hi default link cppNestedName cInclude hi default link cppNestedName cInclude
@ -112,5 +108,3 @@ hi def link cppRawString String
hi def link cppNumber Number hi def link cppNumber Number
let b:current_syntax = 'cpp' let b:current_syntax = 'cpp'
" vim: ts=8