[PATCH] D24719: [include-fixer] Add customized editor settings documents.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 19 03:10:44 PDT 2016
hokein created this revision.
hokein added a reviewer: bkramer.
hokein added a subscriber: cfe-commits.
https://reviews.llvm.org/D24719
Files:
docs/include-fixer.rst
Index: docs/include-fixer.rst
===================================================================
--- docs/include-fixer.rst
+++ 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.71792.patch
Type: text/x-patch
Size: 2390 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160919/083ceca0/attachment-0001.bin>
More information about the cfe-commits
mailing list