Giter Club home page Giter Club logo

vim-cpp-enhanced-highlight's Introduction

vim.cpp - additional vim c++ syntax highlighting

This file contains additional syntax highlighting that I use for C++11/14 development in Vim. Compared to the standard syntax highlighting for C++ it adds highlighting of (user defined) functions and the containers and types in the standard library / boost.

Development is done at: http://github.com/octol/vim-cpp-enhanced-highlight

Screenshot

Optional features

Highlighting of class scope is disabled by default. To enable set

let g:cpp_class_scope_highlight = 1

Highlighting of template functions is enabled by setting

let g:cpp_experimental_template_highlight = 1

Note: C++ template syntax is notoriously difficult to parse, so don't expect this feature to be perfect.

Installation instructions

Follow one of the sets of directions below and reload vim afterwards.

Vundle

Instal using vundle by adding

Plugin 'octol/vim-cpp-enhanced-highlight'

to .vimrc and run :PluginInstall.

Git submodule + Pathogen

If you have pathogen installed, and you prefer to use git submodules, run

cd ~/.vim
git submodule add https://github.com/octol/vim-cpp-enhanced-highlight.git bundle/syntax/

Manual installation

If you don't have either Vundle or Pathogen installed, copy the cpp.vim file (optionally also c.vim) to .vim/after/syntax.

git clone https://github.com/octol/vim-cpp-enhanced-highlight.git /tmp/vim-cpp-enhanced-highlight
mkdir -p ~/.vim/after/syntax/
mv /tmp/vim-cpp-enhanced-highlight/after/syntax/cpp.vim ~/.vim/after/syntax/cpp.vim
rm -rf /tmp/vim-cpp-enhanced-highlight

Issues

Vim tend to a have issues with flagging braces as errors, see for example vim-jp/vim-cpp#16. A workaround is to set

let c_no_curly_error=1

Background information

Jon Haggblad [email protected]

Last update: 21 September 2014

vim-cpp-enhanced-highlight's People

Contributors

octol avatar dncnmcdougall avatar manenko avatar dersaidin avatar rakhimov avatar freeboson avatar svenstaro avatar tholbach avatar tonya11en avatar ahodesuka avatar cntoplolicon avatar patflick avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.