Open anntzer opened 8 years ago
Sounds like something that could be useful to look into in the future. Thanks for the suggestion.
Something like
syntax region cppSTLscoped start='\(std\)\@3<=::\<' end='\>' contains=cppSTLtype
syntax keyword cppSTLtype allocator contained
syntax keyword cppSTLtype auto_ptr contained
syntax keyword cppSTLtype basic_filebuf contained
...
(with separate groups for each namespace if we want to actually check the namespace, or with a single container group just checking for a preceding ::
) works.
There's a lot of names defined in the cppSTLfunction syntax group. In practice this easily leads to spurious highlighting, especially in a programming style where these functions would always be called with the std:: namespace explicitly.
Bonus points if you can auto-detect whether there's a
using namespace std;
in the current scope, but I think this may be a bit too difficult to be worth it?