[PATCH] D153338: [clang-format] vim integration: Mention python3 variant of bindings
Jannik Silvanus via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 21 08:18:46 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9741ac5b3b3e: [clang-format] vim integration: Mention python3 variant of bindings (authored by jsilvanus).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153338/new/
https://reviews.llvm.org/D153338
Files:
clang/docs/ClangFormat.rst
Index: clang/docs/ClangFormat.rst
===================================================================
--- clang/docs/ClangFormat.rst
+++ clang/docs/ClangFormat.rst
@@ -145,8 +145,13 @@
.. code-block:: vim
- map <C-K> :pyf <path-to-this-file>/clang-format.py<cr>
- imap <C-K> <c-o>:pyf <path-to-this-file>/clang-format.py<cr>
+ if has('python')
+ map <C-K> :pyf <path-to-this-file>/clang-format.py<cr>
+ imap <C-K> <c-o>:pyf <path-to-this-file>/clang-format.py<cr>
+ elseif has('python3')
+ map <C-K> :py3f <path-to-this-file>/clang-format.py<cr>
+ imap <C-K> <c-o>:py3f <path-to-this-file>/clang-format.py<cr>
+ endif
The first line enables :program:`clang-format` for NORMAL and VISUAL mode, the
second line adds support for INSERT mode. Change "C-K" to another binding if
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153338.533270.patch
Type: text/x-patch
Size: 800 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230621/9408be37/attachment-0001.bin>
More information about the cfe-commits
mailing list