Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim syntax high-lighting for C++11 that does not mess up other highlighting. E.g., class/namespace scoping

I am aware of this script: http://www.vim.org/scripts/script.php?script_id=3797. It has been suggested a few times, and other questions regarding C++11 syntax for Vim have been shut down due to duplicating this question: Is there a C++11 syntax file for vim?.

Unfortunately, the suggested script results in scoping constructs (e.g. "namespace::member()") not being highlighted anymore, and functions and class names are no longer highlighted.

Does anyone have a better C++11 plugin for Vim available now? Ideally, all the features of the regular C++ plugin being retained, new keywords/reserved words marked (e.g. nullptr), lambda expressions/universal initialization syntax not flagged as errors. etc. etc.

like image 277
Jeet Avatar asked Apr 27 '13 15:04

Jeet


People also ask

Does vim support syntax highlighting?

Syntax highlighting enables Vim to show parts of the text in another font or color. Those parts can be specific keywords or text matching a pattern. Vim doesn't parse the whole file (to keep it fast), so the highlighting has its limitations.

How do I turn on syntax highlighting in Vim?

After opening login.sh file in vim editor, press ESC key and type ':syntax on' to enable syntax highlighting. The file will look like the following image if syntax highlighting is on. Press ESC key and type, “syntax off” to disable syntax highlighting.

What does syntax on mean in Vim?

Syntax highlighting means it can show some parts of text in another fonts and colors. VIM doesn't show whole file but have some limitations in highlighting particular keywords or text matching a pattern in a file.


1 Answers

Have you tried the following? I use this one and like it

http://www.vim.org/scripts/script.php?script_id=4617

like image 108
bjackfly Avatar answered Nov 02 '22 02:11

bjackfly