Lines Matching +refs:clang +refs:format +refs:region
13 :program:`clang-format` is located in `clang/tools/clang-format` and can be used
14 to format C/C++/Obj-C code.
18 $ clang-format -help
19 OVERVIEW: A tool to format C/C++/Java/JavaScript/Objective-C/Protobuf code.
27 USAGE: clang-format [options] [<file> ...]
31 Clang-format options:
33 -assume-filename=<string> - When reading from stdin, clang-format assumes this
37 clang-format from an editor integration
41 fallback in case clang-format is invoked with
42 -style=file, but can not find the .clang-format
50 -length, clang-format will format up to the end
53 -lines=<string> - <start line>:<end line> - format a range of
68 .clang-format file located in one of the parent
84 by putting your style configuration in the ``.clang-format`` or ``_clang-format``
85 file in your project's directory and using ``clang-format -style=file``.
87 An easy way to create the ``.clang-format`` file is:
91 clang-format -style=llvm -dump-config > .clang-format
100 :program:`clang-format` standalone tool on your current buffer, optionally
102 which can be found under `clang/tools/clang-format/clang-format.py`.
108 map <C-K> :pyf <path-to-this-file>/clang-format.py<cr>
109 imap <C-K> <c-o>:pyf <path-to-this-file>/clang-format.py<cr>
111 The first line enables :program:`clang-format` for NORMAL and VISUAL mode, the
113 you need :program:`clang-format` on a different key (C-K stands for Ctrl+k).
115 With this integration you can press the bound key and clang-format will
116 format the current line in NORMAL and INSERT mode or the selected region in
117 VISUAL mode. The line or region is extended to the next bigger syntactic
128 :program:`emacs`. It can be found at `clang/tools/clang-format/clang-format.el`
133 (load "<path-to-clang>/tools/clang-format/clang-format.el")
134 (global-set-key [C-M-tab] 'clang-format-region)
136 This binds the function `clang-format-region` to C-M-tab, which then formats the
137 current line or selected region.
143 :program:`clang-format` cannot be used as a text filter with BBEdit, but works
145 `clang/tools/clang-format/clang-format-bbedit.applescript`; place a copy in
147 point to your local copy of :program:`clang-format`.
150 :program:`clang-format` will format the selection. Note that you can rename the
165 The python script `clang/tools/clang-format-diff.py` parses the output of
166 a unified diff and reformats all contained lines with :program:`clang-format`.
170 usage: clang-format-diff.py [-h] [-i] [-p NUM] [-regex PATTERN] [-style STYLE]
187 git diff -U0 HEAD^ | clang-format-diff.py -i -p1
193 svn diff --diff-cmd=diff -x -U0 | clang-format-diff.py -i
195 The option `-U0` will create a diff without context lines (the script would format