[PATCH] D20329: [clang-include-fixer] Added Vim integration for clang-include-fixer.
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Tue May 17 07:09:56 PDT 2016
bkramer added inline comments.
================
Comment at: include-fixer/tool/ClangIncludeFixer.cpp:51
@@ +50,3 @@
+cl::opt<bool>
+ VimMode("vim",
+ cl::desc("Run the tool on a potentially unsaved buffer from Vim"),
----------------
This isn't really specific to vim, we should name it differently. '-stdin' maybe? Then document what it really does.
================
Comment at: include-fixer/tool/clang-include-fixer.py:38
@@ +37,3 @@
+ # Call clang-include-fixer.
+ command = [binary, "-db=yaml", "-vim", vim.current.buffer.name]
+ p = subprocess.Popen(command,
----------------
yaml is the default, maybe we shouldn't specify it here? Or leave the user a way to configure it.
================
Comment at: include-fixer/tool/clang-include-fixer.py:49
@@ +48,3 @@
+ if stdout:
+ vim.current.buffer[0:0] = [stdout]
+
----------------
This always inserts at the top. Can we emit the position where to insert from the tool and put it there?
http://reviews.llvm.org/D20329
More information about the cfe-commits
mailing list