Skip to content

Commit 3c32c39

Browse files
committed
Configuration filename does not depend of the OS
It can be .clang-format or _clang-format on any OS http://clang.llvm.org/docs/ClangFormat.html
1 parent 8e1baaa commit 3c32c39

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

autoload/clang_format.vim

+1-2
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,7 @@ let g:clang_format#auto_formatexpr = s:getg('clang_format#auto_formatexpr', 0)
166166
" format codes {{{
167167
function! s:detect_style_file()
168168
let dirname = fnameescape(expand('%:p:h'))
169-
let style_file_name = has('win32') || has('win64') ? '_clang-format' : '.clang-format'
170-
return findfile(style_file_name, dirname.';') != ''
169+
return findfile('.clang-format', dirname.';') != '' || findfile('_clang-format', dirname.';') != ''
171170
endfunction
172171

173172
function! clang_format#format(line1, line2)

0 commit comments

Comments
 (0)