diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-01-20 21:08:56 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-01-20 21:08:56 +0100 |
commit | 6be7f8733f34333ed75f6e39425d73a6b2644379 (patch) | |
tree | 59ae0f289e6bfaaf3ed2e8ac5dcedb69e5656c01 /runtime/syntax/c.vim | |
parent | 90b280059fd51790105ff2e433303be58d58c430 (diff) | |
download | vim-6be7f8733f34333ed75f6e39425d73a6b2644379.zip |
Update runtime files.
Diffstat (limited to 'runtime/syntax/c.vim')
-rw-r--r-- | runtime/syntax/c.vim | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index 7af0067f8..4553519b0 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: C " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2012 Jan 04 +" Last Change: 2012 Jan 14 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -62,6 +62,25 @@ syn match cSpecialCharacter display "L\='\\\o\{1,3}'" syn match cSpecialCharacter display "'\\x\x\{1,2}'" syn match cSpecialCharacter display "L'\\x\x\+'" +if !exists("c_no_c11") " ISO C11 + if exists("c_no_cformat") + syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell + else + syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell + endif + syn match cCharacter "[Uu]'[^\\]'" + syn match cCharacter "[Uu]'[^']*'" contains=cSpecial + if exists("c_gnu") + syn match cSpecialError "[Uu]'\\[^'\"?\\abefnrtv]'" + syn match cSpecialCharacter "[Uu]'\\['\"?\\abefnrtv]'" + else + syn match cSpecialError "[Uu]'\\[^'\"?\\abfnrtv]'" + syn match cSpecialCharacter "[Uu]'\\['\"?\\abfnrtv]'" + endif + syn match cSpecialCharacter display "[Uu]'\\\o\{1,3}'" + syn match cSpecialCharacter display "[Uu]'\\x\x\+'" +endif + "when wanted, highlight trailing white space if exists("c_space_errors") if !exists("c_no_trail_space_error") @@ -211,6 +230,7 @@ if !exists("c_no_c11") syn keyword cStorageClass _Noreturn noreturn syn keyword cOperator _Static_assert static_assert syn keyword cStorageClass _Thread_local thread_local + syn keyword cType char16_t char32_t endif if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu") |