I cannot convince vim to apply the coding-style I'd like to (cindent
and friends).
However, integrating clang-format.py
(which uses the .clang-format of my project) actually makes me totally happy.
Except that I have the reflex of using the = + motion-command. Which is actually very nice to indent a region or the whole file.
How can I instruct vim to override the default functionality? I read about equalprg, but I'm unsure how to set it to make it work with clang-format.
vim-clang-format
plugin, together with its requirements (especiallyvim-operator-user
), and then map=
to<Plug>(operator-clang-format)
? Plugin link: github.com/rhysd/vim-clang-format==
for one line andgg=G
for the whole buffer?