Is there a C++11 syntax file for vim?

As an alternative, you can use

let c_no_curly_error=1

in your .vimrc file so that vim doesn't tag {} as error in ().


There is now a C++11 script from http://www.vim.org/scripts/script.php?script_id=3797, which no longer mark the braces inside parenthesis as error.


If you use Syntastic, add this to your .vimrc (or .vimrc.local).

let g:syntastic_cpp_compiler_options = ' -std=c++11'

Syntastic shows errors for code written in multiple languages. Each language has a "checker" which is a wrapper to execute an external program. The external program for the c++ checker is g++. The c++ checker can pass compiler options to g++ and can be configured.

https://github.com/scrooloose/syntastic/wiki/C--:---gcc

If you want to use clang++, you can use these options

let g:syntastic_cpp_compiler = 'clang++'
let g:syntastic_cpp_compiler_options = ' -std=c++11 -stdlib=libc++'

use uniform initialization instead of the old () constructor

vector v {1,2,3};


As far as I know, there is a work in progress for that, see here at the vim_dev mail list.