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