HomePhabricator

clang-format: Add capability to format the diff on save in vim.

Authored by djasper on Jun 19 2017, 12:30 AM.

Description

clang-format: Add capability to format the diff on save in vim.

With this patch, one can configure a BufWrite hook that will make the
clang-format integration compute a diff of 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.

Review: https://reviews.llvm.org/D32429
llvm-svn: 305665

Details

Committed
djasperJun 19 2017, 12:30 AM
Parents
rGf955efc01be8: Fix a -Wmisleading-indentation warning
Branches
Unknown
Tags
Unknown