jsilvanus updated this revision to Diff 533149. jsilvanus added a comment. Don't change proposed key binding from K to I, just add the python3 part.
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
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
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits