forked from OSchip/llvm-project
[include-fixer] Add customized editor settings documents.
Reviewers: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24719 llvm-svn: 282480
This commit is contained in:
parent
d48a8672b4
commit
54f8efaa26
|
@ -81,13 +81,40 @@ Make sure vim can find :program:`clang-include-fixer`:
|
|||
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 @@ Make sure Emacs can find :program:`clang-include-fixer`:
|
|||
|
||||
- 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
|
||||
|
|
Loading…
Reference in New Issue