-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++11 Initializer Lists marked with error style #10
Comments
The solution is inside of this. https://github.com/vim-scripts/Cpp11-Syntax-Support It should be pretty easy to merge the syntax between these two plugins. |
Reopening because there is nothing out of the box that gives as much color as cpp-enhanced-highlight and which supports e.g. c++11 initializer list shenanigans. Note for the c++11 plugin you have to use |
I'm not able to reproduce the above results on my side. Is your cpp.vim up to date? |
I see that the latest cpp.vim bundled with vanilla vim from Mercurial is dated 2015 Mar 1. Likely the one I was using that had the issue shown in the OP is a cpp.vim dated 2014 May 14. This somewhat-old one is here on my system: In fact, I have way too many versions of these files. There are 4 versions, the second one from the left is the cpp.vim from the plugin I linked (although with my own modifications to make it "stack" on any existing cpp syntax). It does appear to me that some order of sourcing all or most of them will yield a better syntax experience than any single one. |
This doesn't work for me as well on fresh |
Something like "unordered_set({4,3})" works fine for me, but I still have this case where the curly brackets are red (my Key class has a constructor that takes an initializer_list): std::map<Key, int> map;
map[Key{"hi", "there"}] = 2; |
I forgot to mention this, but my use case is the same as @beatmax's. |
Sorry, that |
It has the same issue, though... vim-jp/vim-cpp#16 |
@rr-, interesting. I wonder why I don't see it. |
Well turns out the reason I've not been able to reproduce it is that I set |
Since there is a workaround, I'm closing this for now. |
The text was updated successfully, but these errors were encountered: