bfrg / Vim Cpp Modern
Extended Vim syntax highlighting for C and C++ (C++11/14/17/20)
Stars: ✭ 229
Labels
Projects that are alternatives of or similar to Vim Cpp Modern
colocat
Fegeya Colocat, Colorized 'cat' implementation. Written in C++17.
Stars: ✭ 14 (-93.89%)
Mutual labels: syntax, highlighting
splash
🌊 Highlight source code embedded in HTML with a splash of color
Stars: ✭ 19 (-91.7%)
Mutual labels: syntax, highlighting
Chroma
A general purpose syntax highlighter in pure Go
Stars: ✭ 3,013 (+1215.72%)
Mutual labels: syntax, highlighting
remark-highlight.js
Legacy plugin to highlight code blocks with highlight.js — please use `rehype-highlight` instead
Stars: ✭ 58 (-74.67%)
Mutual labels: syntax, highlighting
Markserv
🏁 serve markdown as html (GitHub style), index directories, live-reload as you edit
Stars: ✭ 304 (+32.75%)
Mutual labels: syntax, highlighting
Nord Highlightjs
An arctic, north-bluish clean and elegant highlight.js theme.
Stars: ✭ 49 (-78.6%)
Mutual labels: syntax, highlighting
KodeEditor
A simple code editor with syntax highlighting and pinch to zoom
Stars: ✭ 60 (-73.8%)
Mutual labels: syntax, highlighting
odin.vim
Vim syntax highlighting for Ginger Bill's programming language, Odin. Derived from jansedivy's jai.vim.
Stars: ✭ 16 (-93.01%)
Mutual labels: syntax, highlighting
Python Syntax
Python syntax highlighting for Vim
Stars: ✭ 297 (+29.69%)
Mutual labels: syntax, highlighting
Nord Emacs
An arctic, north-bluish clean and elegant Emacs theme.
Stars: ✭ 379 (+65.5%)
Mutual labels: syntax, highlighting
Nord Sublime Text
An arctic, north-bluish clean and elegant Sublime Text theme.
Stars: ✭ 109 (-52.4%)
Mutual labels: syntax, highlighting
Vue Highlight.js
📜 Highlight.js syntax highlighter component for Vue.
Stars: ✭ 180 (-21.4%)
Mutual labels: syntax
Udify
A single model that parses Universal Dependencies across 75 languages. Given a sentence, jointly predicts part-of-speech tags, morphology tags, lemmas, and dependency trees.
Stars: ✭ 147 (-35.81%)
Mutual labels: syntax
Ecsharp
Home of LoycCore, the LES language of Loyc trees, the Enhanced C# parser, the LeMP macro preprocessor, and the LLLPG parser generator.
Stars: ✭ 141 (-38.43%)
Mutual labels: syntax
Lightscript
JavaScript, with cleaned-up syntax and a few conveniences.
Stars: ✭ 141 (-38.43%)
Mutual labels: syntax
Zsh Syntax Highlighting Filetypes
zsh syntax highlighting with dircolors in realtime
Stars: ✭ 130 (-43.23%)
Mutual labels: highlighting
vim-cpp-modern: Enhanced C and C++ syntax highlighting
Keyword and regex-based syntax highlighting for C and C++11/14/17/20 in Vim.
The syntax files provide highlighting of:
- Common ANSI C keywords
- C++ Standard Library namespaces, types, helper types, helper template variables, and constants
- C++11 attributes
- Latest C++20 language features like coroutines and concepts
- Function declarations/definitions and function calls (basically all words followed by an opening parenthesis)
- Optionally a simpler (less colorful) highlighting of standard C and C++ keywords
Code snippet from cppreference (left: default 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
,explicit
andexport
are 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, class names in declarations, and class scopes 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_no_function_highlight = 1
" 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
" 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
,constexpr
decltype
,consteval
,constinit
Installation
$ cd ~/.vim/pack/git-plugins/start
$ git clone --depth=1 https://github.com/bfrg/vim-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
.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].