• Home
  • Raw
  • Download

Lines Matching +refs:clang +refs:format +refs:buffer

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++/Obj-C code.
27 USAGE: clang-format [options] [<file> ...]
31 Clang-format options:
34 clang-format from an editor integration
42 -length, clang-format will format up to the end
45 -lines=<string> - <start line>:<end line> - format a range of
59 .clang-format file located in one of the parent
75 by putting your style configuration in the ``.clang-format`` or ``_clang-format``
76 file in your project's directory and using ``clang-format -style=file``.
78 An easy way to create the ``.clang-format`` file is:
82 clang-format -style=llvm -dump-config > .clang-format
91 :program:`clang-format` standalone tool on your current buffer, optionally
93 which can be found under `clang/tools/clang-format/clang-format.py`.
99 map <C-K> :pyf <path-to-this-file>/clang-format.py<CR>
100 imap <C-K> <ESC>:pyf <path-to-this-file>/clang-format.py<CR>i
102 The first line enables :program:`clang-format` for NORMAL and VISUAL mode, the
104 you need :program:`clang-format` on a different key (C-K stands for Ctrl+k).
106 With this integration you can press the bound key and clang-format will
107 format the current line in NORMAL and INSERT mode or the selected region in
111 It operates on the current, potentially unsaved buffer and does not create
119 :program:`emacs`. It can be found at `clang/tools/clang-format/clang-format.el`
124 (load "<path-to-clang>/tools/clang-format/clang-format.el")
125 (global-set-key [C-M-tab] 'clang-format-region)
127 This binds the function `clang-format-region` to C-M-tab, which then formats the
134 :program:`clang-format` cannot be used as a text filter with BBEdit, but works
136 `clang/tools/clang-format/clang-format-bbedit.applescript`; place a copy in
138 point to your local copy of :program:`clang-format`.
141 :program:`clang-format` will format the selection. Note that you can rename the
156 The python script `clang/tools/clang-format-diff.py` parses the output of
157 a unified diff and reformats all contained lines with :program:`clang-format`.
161 usage: clang-format-diff.py [-h] [-i] [-p NUM] [-regex PATTERN] [-style STYLE]
178 git diff -U0 HEAD^ | clang-format-diff.py -i -p1
184 svn diff --diff-cmd=diff -x-U0 | clang-format-diff.py -i
186 The :option:`-U0` will create a diff without context lines (the script would format