This is an archive of the discontinued LLVM Phabricator instance.

Add capability to format the diff on save to clang-format's vim integration
ClosedPublic

Authored by djasper on Apr 24 2017, 6:00 AM.

Details

Reviewers
klimek
Summary

With this patch, one can configure a BufWrite hook that will make the clang-format integration diff the current buffer with the file that's on disk and format all changed lines. This should create a zero-overhead auto-format solution that doesn't require the file to already be clang-format clean to avoid spurious diffs.

Diff Detail

Event Timeline

djasper created this revision.Apr 24 2017, 6:00 AM

Ping? Do you think this is useful?

djasper edited reviewers, added: klimek; removed: chandlerc, bkramer.May 2 2017, 12:00 AM
klimek accepted this revision.May 3 2017, 11:32 AM

Lg

docs/ClangFormat.rst
124

Pronoun missing.

This revision is now accepted and ready to land.May 3 2017, 11:32 AM

Submitted as r305665.

djasper closed this revision.Jun 19 2017, 12:31 AM