Prepare your vim environment to work with clang-format

Problem

E319: Sorry, this command is not available in this version.

Problem
When I start the vim environment and try to reformat the code (CTRL + K), I get this warning on the screen

Environment:
System: Mac OS X

Settings:
Vim:

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 17 2016 20:17:27)
MacOS X (unix) version
Included patches: 1-91

python:

python --version: Python 3.5.2

What am I doing

thank,

+4
source share
1

:

1. .vimrc

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>

2. https://llvm.org/svn/llvm-project/cfe/trunk/tools/clang-format/clang-format.py clang-format.py, ,

<path-to-this-file>/clang-format.py

- , .

3. clang-format.py vim. , .

macvim OSX. . MacVim OS X?

+2

Source: https://habr.com/ru/post/1661243/


All Articles