Mercurial > vim
comparison runtime/syntax/c.vim @ 3281:af1e8a1714c2
Update runtime files.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 20 Jan 2012 21:08:56 +0100 |
parents | ba708ee8d69d |
children | 1b584a6f446c |
comparison
equal
deleted
inserted
replaced
3280:aa265b7165cc | 3281:af1e8a1714c2 |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: C | 2 " Language: C |
3 " Maintainer: Bram Moolenaar <Bram@vim.org> | 3 " Maintainer: Bram Moolenaar <Bram@vim.org> |
4 " Last Change: 2012 Jan 04 | 4 " Last Change: 2012 Jan 14 |
5 | 5 |
6 " Quit when a (custom) syntax file was already loaded | 6 " Quit when a (custom) syntax file was already loaded |
7 if exists("b:current_syntax") | 7 if exists("b:current_syntax") |
8 finish | 8 finish |
9 endif | 9 endif |
59 syn match cSpecialCharacter "L\='\\['\"?\\abfnrtv]'" | 59 syn match cSpecialCharacter "L\='\\['\"?\\abfnrtv]'" |
60 endif | 60 endif |
61 syn match cSpecialCharacter display "L\='\\\o\{1,3}'" | 61 syn match cSpecialCharacter display "L\='\\\o\{1,3}'" |
62 syn match cSpecialCharacter display "'\\x\x\{1,2}'" | 62 syn match cSpecialCharacter display "'\\x\x\{1,2}'" |
63 syn match cSpecialCharacter display "L'\\x\x\+'" | 63 syn match cSpecialCharacter display "L'\\x\x\+'" |
64 | |
65 if !exists("c_no_c11") " ISO C11 | |
66 if exists("c_no_cformat") | |
67 syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell | |
68 else | |
69 syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell | |
70 endif | |
71 syn match cCharacter "[Uu]'[^\\]'" | |
72 syn match cCharacter "[Uu]'[^']*'" contains=cSpecial | |
73 if exists("c_gnu") | |
74 syn match cSpecialError "[Uu]'\\[^'\"?\\abefnrtv]'" | |
75 syn match cSpecialCharacter "[Uu]'\\['\"?\\abefnrtv]'" | |
76 else | |
77 syn match cSpecialError "[Uu]'\\[^'\"?\\abfnrtv]'" | |
78 syn match cSpecialCharacter "[Uu]'\\['\"?\\abfnrtv]'" | |
79 endif | |
80 syn match cSpecialCharacter display "[Uu]'\\\o\{1,3}'" | |
81 syn match cSpecialCharacter display "[Uu]'\\x\x\+'" | |
82 endif | |
64 | 83 |
65 "when wanted, highlight trailing white space | 84 "when wanted, highlight trailing white space |
66 if exists("c_space_errors") | 85 if exists("c_space_errors") |
67 if !exists("c_no_trail_space_error") | 86 if !exists("c_no_trail_space_error") |
68 syn match cSpaceError display excludenl "\s\+$" | 87 syn match cSpaceError display excludenl "\s\+$" |
209 syn keyword cStorageClass _Atomic | 228 syn keyword cStorageClass _Atomic |
210 syn keyword cOperator _Generic | 229 syn keyword cOperator _Generic |
211 syn keyword cStorageClass _Noreturn noreturn | 230 syn keyword cStorageClass _Noreturn noreturn |
212 syn keyword cOperator _Static_assert static_assert | 231 syn keyword cOperator _Static_assert static_assert |
213 syn keyword cStorageClass _Thread_local thread_local | 232 syn keyword cStorageClass _Thread_local thread_local |
233 syn keyword cType char16_t char32_t | |
214 endif | 234 endif |
215 | 235 |
216 if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu") | 236 if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu") |
217 if exists("c_gnu") | 237 if exists("c_gnu") |
218 syn keyword cConstant __GNUC__ __FUNCTION__ __PRETTY_FUNCTION__ __func__ | 238 syn keyword cConstant __GNUC__ __FUNCTION__ __PRETTY_FUNCTION__ __func__ |