diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-10-27 17:13:33 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-10-27 17:13:33 +0000 |
commit | f8754648fd1c6480c4e4afe1d018ece991d8e8b9 (patch) | |
tree | 15c24e54f7fe0618320df73a19adcdd3f17c89e8 /tools | |
parent | f52b29d996b1774762799268b0d22cef7ff3ccc9 (diff) |
clang-format: improve vim integration docs
Improve the documentation for vim integration of clang-format. Prefer the use
of <c-o> 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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220685 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/clang-format/clang-format.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/clang-format/clang-format.py b/tools/clang-format/clang-format.py index 16a1879108..487b9ed48e 100644 --- a/tools/clang-format/clang-format.py +++ b/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 |