From 1f060a85526ac08fd23b46968fd97f75a2930030 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Mon, 27 Oct 2014 17:13:33 +0000 Subject: [PATCH] clang-format: improve vim integration docs Improve the documentation for vim integration of clang-format. Prefer the use of to do the normal mode command execution to avoid side-effects of the escape and re-insertion (cursor movement). Tweak the macros to use a double return to avoid having to manually return control to the editor from the subprocess. llvm-svn: 220685 --- clang/docs/ClangFormat.rst | 4 ++-- clang/tools/clang-format/clang-format.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clang/docs/ClangFormat.rst b/clang/docs/ClangFormat.rst index 86c5ec5..b372417 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 :pyf /clang-format.py - imap :pyf /clang-format.pyi + map :pyf /clang-format.py + imap :pyf /clang-format.py 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 16a1879..487b9ed 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 :pyf /clang-format.py -# imap :pyf /clang-format.pyi +# map :pyf /clang-format.py +# imap :pyf /clang-format.py # # 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 -- 2.7.4