summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/docs/ClangFormat.rst4
-rw-r--r--clang/tools/clang-format/clang-format.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/clang/docs/ClangFormat.rst b/clang/docs/ClangFormat.rst
index 86c5ec5e587..b37241786b4 100644
--- a/clang/docs/ClangFormat.rst
+++ b/clang/docs/ClangFormat.rst
@@ -96,8 +96,8 @@ 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> <ESC>:pyf <path-to-this-file>/clang-format.py<CR>i
+ map <C-K> :pyf <path-to-this-file>/clang-format.py<cr><cr>
+ imap <C-K> <c-o>:pyf <path-to-this-file>/clang-format.py<cr><cr>
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
diff --git a/clang/tools/clang-format/clang-format.py b/clang/tools/clang-format/clang-format.py
index 16a18791083..487b9ed48e1 100644
--- a/clang/tools/clang-format/clang-format.py
+++ b/clang/tools/clang-format/clang-format.py
@@ -2,8 +2,8 @@
# - Change 'binary' if clang-format is not on the path (see below).
# - Add to your .vimrc:
#
-# map <C-I> :pyf <path-to-this-file>/clang-format.py<CR>
-# imap <C-I> <ESC>:pyf <path-to-this-file>/clang-format.py<CR>i
+# map <C-I> :pyf <path-to-this-file>/clang-format.py<cr>
+# imap <C-I> <c-o>:pyf <path-to-this-file>/clang-format.py<cr><cr>
#
# The first line enables clang-format for NORMAL and VISUAL mode, the second
# line adds support for INSERT mode. Change "C-I" to another binding if you
OpenPOWER on IntegriCloud