diff --git a/clang/docs/ClangFormat.rst b/clang/docs/ClangFormat.rst --- a/clang/docs/ClangFormat.rst +++ b/clang/docs/ClangFormat.rst @@ -145,8 +145,13 @@ .. code-block:: vim - map :pyf /clang-format.py - imap :pyf /clang-format.py + if has('python') + map :pyf /clang-format.py + imap :pyf /clang-format.py + elseif has('python3') + map :py3f /clang-format.py + imap :py3f /clang-format.py + 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