summaryrefslogtreecommitdiffstats
path: root/runtime/syntax/c.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:57 +0000
commitaafdfa61bb0af95e98ca825d1f7839801c22d434 (patch)
treeb792417ed6c2f7764f816aecd177e46b1baad149 /runtime/syntax/c.vim
parentAdding debian version 2:9.1.0016-1. (diff)
downloadvim-aafdfa61bb0af95e98ca825d1f7839801c22d434.tar.xz
vim-aafdfa61bb0af95e98ca825d1f7839801c22d434.zip
Merging upstream version 2:9.1.0199.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--runtime/syntax/c.vim12
1 files changed, 11 insertions, 1 deletions
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index 5ed8fdc..30db943 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -252,7 +252,7 @@ if exists("c_gnu")
syn keyword cOperator typeof __typeof__
syn keyword cOperator __real__ __imag__
syn keyword cStorageClass __attribute__ __const__ __extension__
- syn keyword cStorageClass inline __inline__
+ syn keyword cStorageClass inline __inline __inline__
syn keyword cStorageClass __restrict__ __volatile__ __noreturn__
endif
syn keyword cType int long short char void
@@ -444,6 +444,14 @@ syn match cUserLabel display "\I\i*" contained
syn match cBitField display "^\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
syn match cBitField display ";\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
+if exists("c_functions")
+ syn match cFunction "\<\h\w*\ze\_s*("
+ endif
+
+if exists("c_function_pointers")
+ syn match cFunctionPointer "\%((\s*\*\s*\)\@<=\h\w*\ze\s*)\_s*(.*)"
+endif
+
if exists("c_minlines")
let b:c_minlines = c_minlines
else
@@ -513,6 +521,8 @@ hi def link cCppOutSkip cCppOutIf2
hi def link cCppInElse2 cCppOutIf2
hi def link cCppOutIf2 cCppOut
hi def link cCppOut Comment
+hi def link cFunction Function
+hi def link cFunctionPointer Function
let b:current_syntax = "c"