bfrg/vim-c-cpp-modern
bfrg/vim-c-cpp-modern has 610 GitHub stars and 43 forks. GitHot measured 0 stars in 24 hours and -1 in 7 days. Last checked 2026-11-23 05:57 UTC. Last push 2025-12-25.
What you can do
- C: static, register, auto, volatile, extern, const, inline, __attribute__, restrict, alignas, alignof, static_assert, noreturn, thread_local, struct, union, enum, case, default
- C++: class, typename, template, namespace, concept, mutable, constexpr decltype, consteval, constinit
측정된 스타 증가
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
소개
Extended Vim syntax highlighting for C and C++ (C++11..26)
개발 도구README.md
Originalvim-c-cpp-modern: Enhanced C and C++ syntax highlighting
Keyword and regex-based syntax highlighting for C and C++11..26 in Vim.
The syntax files provide highlighting of:
- Common ANSI C keywords
- C++ Standard Library namespaces, types, helper types, helper template variables, and constants
- Latest C++ language features like attributes, coroutines and concepts
- Function and function pointer declarations, and function calls (basically all words followed by an opening parenthesis)
- Optionally a simpler (less colorful) highlighting of standard C and C++ keywords
left: default
cpp.vim syntax file, right: this plugin
Difference to vim-cpp-enhanced-highlight
Both syntax files are based on vim-cpp-enhanced-highlight with the following modifications:
- The C++ keywords
virtual,override,final,inline,explicitandexportare standard C++ statements and not types and are therefore highlighted using the highlight groupStatement. - Highlighting of library functions is purely regex-based.
- User-defined function templates and class/struct members are not highlighted. Their regex'es are too complicated and slow, and fail too often.
Optional features
" Disable function highlighting (affects both C and C++ files)
let g:cpp_function_highlight = 0
" Enable highlighting of C++11 attributes
let g:cpp_attributes_highlight = 1
" Highlight struct/class member variables (affects both C and C++ files)
let g:cpp_member_highlight = 1
" Disable highlighting of type names in class, struct, union, enum, using, and
" concept declarations (affects both C and C++ files)
let g:cpp_type_name_highlight = 0
" Highlight operators (affects both C and C++ files)
let g:cpp_operator_highlight = 1
" Put builtin C and C++ types (int, long, double, auto, bool etc.) under Vim's
" highlight group 'Statement' (results in a simpler syntax highlighting)
let g:cpp_builtin_types_as_statement = 1
" Put all standard C and C++ keywords under Vim's highlight group 'Statement'
" (affects both C and C++ files)
let g:cpp_simple_highlight = 1
The last option changes the highlighting of the following keywords:
- C:
static,register,auto,volatile,extern,const,inline,__attribute__,restrict,alignas,alignof,static_assert,noreturn,thread_local,struct,union,enum,case,default - C++:
class,typename,template,namespace,concept,mutable,constexprdecltype,consteval,constinit
Installation
$ cd ~/.vim/pack/git-plugins/start
$ git clone https://github.com/bfrg/vim-c-cpp-modern
Note: The directory name git-plugins is arbitrary, you can pick any other
name. For more details see :help packages.
License
Distributed under the same terms as Vim itself. See :help license.
관련 프로젝트 살펴보기
불러오는 중…