diff --git a/clang/docs/ClangFormat.rst b/clang/docs/ClangFormat.rst index dbd9c91ae508e5..41e06558e1b45c 100644 --- a/clang/docs/ClangFormat.rst +++ b/clang/docs/ClangFormat.rst @@ -198,9 +198,12 @@ your `.vimrc`: function! Formatonsave() let l:formatdiff = 1 - pyf /clang-format.py + if has('python') + pyf /clang-format.py + elseif has('python3') + py3f /clang-format.py endfunction - autocmd BufWritePre *.h,*.cc,*.cpp call Formatonsave() + autocmd BufWritePre *.h,*.cc,*.cpp,*.cppm call Formatonsave() Emacs Integration