I ask because I work on a lot of embedded projects, where the system headers are not useful, and what you frequently want is project-relative headers plus headers from <insert RTOS name here>. Many (most) RTOS' have headers whose names collide with the names of system headers, so you can't just bulk out the include path.

Great work, it took me a while to get it up an running since I am parsing Linux system headers on a Windows machine but now it's good. Only one question though, is there a way to enable auto-completion in the global namespace without using ::? if I start typing something like 'epoll_', I want to see all the possible completion options right away. Right now it doesn't show anything unless I type '::epoll_'.

The default key-binding for triggering autocomplete operations in Sublime Text 2 is "ctrl+space", so typing 'epoll_' and then hitting ctrl+space should work. You can also start typing and hit tab to select the highest scoring completion (another built in Sublime Text 2 feature).

If you are using the dev branch of Sublime Text 2 autocomplete will pop up automatically after typing a few characters, but personally I've turned that off since the completions in my sources takes too long

On Mac, is there any way to pick which copy of libclang is used? I don't know how much the ABI changes, but whichever version you are using / picking up is older than the (svn) copy of clang I am using (which has better c++0x support).

azumanga, while I haven't tried it myself, I see no reason why this wouldn't be possible. Try to replace libclang.dylib in ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/SublimeClang/ with the one you've compiled. Not sure if libclang is compiled by default as part of compiling clang, so you might need to specifically compile it as a separate step.