How can I install clang-format in Ubuntu?

Validus Oculus picture Validus Oculus · Dec 24, 2013 · Viewed 66.5k times · Source

I am trying to use clang-tools in particular clang-format for automatic code formatting in vim but I couldn't find this tool with apt-get search.

Is there anybody experienced this problem before, do you have any suggestion?

Answer

user218867 picture user218867 · Apr 8, 2018

With Ubuntu 16.04, simply do:

sudo apt install clang-format