[PATCH] D24719: [include-fixer] Add customized editor settings documents.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 27 03:52:32 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL282480: [include-fixer] Add customized editor settings documents. (authored by hokein).

Changed prior to commit:
  https://reviews.llvm.org/D24719?vs=71792&id=72623#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D24719

Files:
  clang-tools-extra/trunk/docs/include-fixer.rst

Index: clang-tools-extra/trunk/docs/include-fixer.rst
===================================================================
--- clang-tools-extra/trunk/docs/include-fixer.rst
+++ clang-tools-extra/trunk/docs/include-fixer.rst
@@ -81,13 +81,40 @@
 You can customize the number of headers being shown by setting
 ``let g:clang_include_fixer_maximum_suggested_headers=5``
 
+Customized settings in `.vimrc`:
+
+- ``let g:clang_include_fixer_path = "clang-include-fixer"``
+
+  Set clang-include-fixer binary file path.
+
+- ``let g:clang_include_fixer_maximum_suggested_headers = 3``
+
+  Set the maximum number of ``#includes`` to show. Default is 3.
+
+- ``let g:clang_include_fixer_increment_num = 5``
+
+  Set the increment number of #includes to show every time when pressing ``m``.
+  Default is 5.
+
+- ``let g:clang_include_fixer_jump_to_include = 0``
+
+  Set to 1 if you want to jump to the new inserted ``#include`` line. Default is
+  0.
+
+- ``let g:clang_include_fixer_query_mode = 0``
+
+  Set to 1 if you want to insert ``#include`` for the symbol under the cursor.
+  Default is 0. Compared to normal mode, this mode won't parse the source file
+  and only search the sysmbol from database, which is faster than normal mode.
+
 See ``clang-include-fixer.py`` for more details.
 
 Integrate with Emacs
 --------------------
 To run `clang-include-fixer` on a potentially unsaved buffer in Emacs.
-Ensure that Emacs finds ``clang-include-fixer.el`` by adding the directory containing the file to the ``load-path``
-and requiring the `clang-include-fixer` in your ```.emacs``:
+Ensure that Emacs finds ``clang-include-fixer.el`` by adding the directory
+containing the file to the ``load-path`` and requiring the `clang-include-fixer`
+in your ``.emacs``:
 
 .. code-block:: console
 
@@ -100,6 +127,19 @@
 
 - Add the path to :program:`clang-include-fixer` to the PATH environment variable.
 
+Customized settings in `.emacs`:
+
+- ``(custom-set-variables '(clang-include-fixer-executable "/path/to/include-fixer"))``
+
+  Set clang-include-fixer binary file path.
+
+- ``(custom-set-variables '(clang-include-fixer-query-mode t))``
+
+  Set to `t` if you want to insert ``#include`` for the symbol under the cursor.
+  Default is `nil`. Compared to normal mode, this mode won't parse the source
+  file and only search the sysmbol from database, which is faster than normal
+  mode.
+
 See ``clang-include-fixer.el`` for more details.
 
 How it Works


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24719.72623.patch
Type: text/x-patch
Size: 2462 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160927/fe2a979e/attachment.bin>


More information about the cfe-commits mailing list