[clang] Update ClangFormat.rst (PR #109380)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 19 23:22:55 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: helianthus (love1angel)
<details>
<summary>Changes</summary>
latest vim such as 9.1 remove python and add python3 dependency
---
Full diff: https://github.com/llvm/llvm-project/pull/109380.diff
1 Files Affected:
- (modified) clang/docs/ClangFormat.rst (+5-2)
``````````diff
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 <path-to-this-file>/clang-format.py
+ if has('python')
+ pyf <path-to-this-file>/clang-format.py
+ elseif has('python3')
+ py3f <path-to-this-file>/clang-format.py
endfunction
- autocmd BufWritePre *.h,*.cc,*.cpp call Formatonsave()
+ autocmd BufWritePre *.h,*.cc,*.cpp,*.cppm call Formatonsave()
Emacs Integration
``````````
</details>
https://github.com/llvm/llvm-project/pull/109380
More information about the cfe-commits
mailing list