[PATCH] D20329: [clang-include-fixer] Added Vim integration for clang-include-fixer.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Tue May 17 07:18:44 PDT 2016

hokein added inline comments.

Comment at: include-fixer/tool/ClangIncludeFixer.cpp:51
@@ +50,3 @@
+    VimMode("vim",
+            cl::desc("Run the tool on a potentially unsaved buffer from Vim"),
bkramer wrote:
> This isn't really specific to vim, we should name it differently. '-stdin' maybe? Then document what it really does.
I think we can make the include-fixer accept stdin input by default if there is no command-line file path. In this case, there is no need to add a command-line option here.

Comment at: include-fixer/tool/clang-include-fixer.py:50
@@ +49,3 @@
+    vim.current.buffer[0:0] = [stdout]
Add `if __name__ == '__main__':`.


More information about the cfe-commits mailing list