mirror of
https://github.com/intel/llvm.git
synced 2026-01-21 12:19:23 +08:00
[clang-format] vim integration: Mention python3 variant of bindings
The instructions in the documentation only mentioned how to include bindings for clang-format into vim using python2. Add the instructions for python3 which were already present in the source comments. Differential Revision: https://reviews.llvm.org/D153338 Change-Id: I25fdbd36f0c7e745061908be8e26f68cb31c7dd5
This commit is contained in:
@@ -145,8 +145,13 @@ This can be integrated by adding the following to your `.vimrc`:
|
||||
|
||||
.. 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
|
||||
|
||||
Reference in New Issue
Block a user