SublimeClang is the greatest thing in ST3, at least in every C++ programmer’s mind: it is the only plugin in ST that supports C++ intelligent completion/jumping.
So it is a little tricky to set up SublimeClang in ST3 now, especially in Linux. Here is a memo.
1. Clone SublimeClang’s code base using Git. Use following command to clone the code base to the plugins’ directory of ST.
git clone --recursive https://github.com/quarnster/SublimeClang SublimeClang
2. Compile libcache. In Linux, you have to compile libcache manually. Use following commands in src directory of SublimeClang.
cd src mkdir build cd build cmake .. make
3. Here is the tricky part. If you just “make”, it will automatically download and compile clang and llvm, which will take a long long time. Just install the pre-built version of your distribution. In Ubuntu, it will be:
sudo apt-get install clang
And you need to make a symbol link of libclang.so to “internal” directory of SublimeClang.
ln -s /usr/lib/libclang.so.1 libclang.so
Note that the path of the file may be slightly different.
4. Now you can back to step 2, and libcache will be compiled instantly.
5. Done. Enjoy the fantastic plugin!