Skip to content

Commit 9319ebf

Browse files
committed
g:clang_format#enable_fallback_style is described in doc
1 parent 1aecc1e commit 9319ebf

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ Vim's format mappings (e.g. `gq`) get to use `clang-format` to format. This
110110
option is not comptabile with Vim's `textwidth` feature. You must set
111111
`textwidth` to `0` when the `formatexpr` is set.
112112

113+
- `g:clang_format#enable_fallback_style`
114+
115+
When the value is 0, `-fallback-style=none` option is added on executing clang-format command.
116+
It means that vim-clang-format does nothing when `.clang-format` is not found.
117+
The default value is 1.
118+
113119
## Vimrc Example
114120

115121
```vim

doc/clang-format.txt

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,16 @@ License |vim-clang-format-license|
2020
INTRODUCTION *vim-clang-format-introduction*
2121

2222
*vim-clang-format* formats your C, C++ and Objective-C code with specific coding
23-
style using clang.
23+
style using clang. Following filetypes are supported.
24+
25+
* c
26+
* cpp
27+
* objc
28+
* javascript
29+
* java
30+
* typescript
31+
* proto
32+
* arduino
2433

2534
Screenshot:
2635
http://gifzo.net/BIteGJ9Vasg.gif
@@ -183,15 +192,20 @@ g:clang_format#auto_format_on_insert_leave
183192
When the value is 1, the inserted lines are automatically formatted on
184193
leaving insert mode. Formatting is executed on |InsertLeave| event.
185194

186-
187-
188195
g:clang_format#auto_formatexpr *g:clang_format#auto_formatexpr*
189196

190197
When the value is 1, 'formatexpr' option is set automatically in |c|, |cpp|
191198
and |objc| codes. Vim's format mappings (e.g. |gq|) get to use |clang-format|
192199
to format. This option is not comptabile with Vim's `textwidth` feature. You
193200
must set `textwidth` to `0` when the `formatexpr` is set.
194201

202+
g:clang_format#enable_fallback_style *g:clang_format#enable_fallback_style*
203+
204+
When the value is 0, "-fallback-style=none" option is added on executing
205+
clang-format command. It means that vim-clang-format does nothing when
206+
".clang-format" is not found.
207+
The default value is 1.
208+
195209

196210

197211
==============================================================================
@@ -233,7 +247,7 @@ LICENSE *vim-clang-format-license*
233247

234248
|vim-clang-format| is distributed under MIT license.
235249

236-
Copyright (c) 2013-2014 rhysd
250+
Copyright (c) 2013-2017 rhysd
237251

238252
Permission is hereby granted, free of charge, to any person obtaining
239253
a copy of this software and associated documentation files (the
@@ -254,5 +268,6 @@ LICENSE *vim-clang-format-license*
254268
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
255269

256270

271+
257272
==============================================================================
258273
vim:tw=78:colorcolumn=78:ts=8:ft=help:norl:noet:fen:fdl=0:

0 commit comments

Comments
 (0)