# HG changeset patch # User Ricardo Catalinas Jim�nez # Date 1339243985 -7200 # Node ID c0825ff5b1ed15ad8daed77b675155e49fdda69b # Parent bda6f720360683d3026d6bcd7a7a5c6d63117f96 Add C++ 11 keywords to the syntax file I made sure the added keywords were not previously included in the c.vim script. Also removes the NPOS as it seems not useful. diff -r bda6f7203606 -r c0825ff5b1ed runtime/syntax/cpp.vim --- a/runtime/syntax/cpp.vim Thu Jun 07 21:09:39 2012 +0200 +++ b/runtime/syntax/cpp.vim Sat Jun 09 14:13:05 2012 +0200 @@ -1,7 +1,8 @@ " Vim syntax file " Language: C++ " Maintainer: Ken Shan -" Last Change: 2002 Jul 15 +" Contributor: Ricardo Catalinas Jim�nez +" Last Change: 2012 Jun 9 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -19,7 +20,7 @@ unlet b:current_syntax endif -" C++ extentions +" C++ extensions syn keyword cppStatement new delete this friend using syn keyword cppAccess public protected private syn keyword cppType inline virtual explicit export bool wchar_t @@ -30,9 +31,16 @@ syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$" syn keyword cppStorageClass mutable syn keyword cppStructure class typename template namespace -syn keyword cppNumber NPOS syn keyword cppBoolean true false +" C++ 11 extensions +if !exists("cpp_no_cpp11") + syn keyword cppType override final + syn keyword cppExceptions noexcept + syn keyword cppStorageClass constexpr decltype + syn keyword cppConstant nullptr +endif + " The minimum and maximum operators in GNU C++ syn match cppMinMax "[<>]?" @@ -52,8 +60,8 @@ HiLink cppType Type HiLink cppStorageClass StorageClass HiLink cppStructure Structure - HiLink cppNumber Number HiLink cppBoolean Boolean + HiLink cppConstant Constant delcommand HiLink endif