E319: Sorry, the command is not available in this version on macvim While trying to prepare macvim environment to work with clang-format I did:

$ vim ~/.vimrc

map &lt;C-K&gt; :pyf /usr/local/Cellar/clang-format/2018-04-24/share/clang/clang-format.py&lt;cr&gt;
imap &lt;C-K&gt; &lt;c-o&gt;:pyf /usr/local/Cellar/clang-format/2018-04-24/share/clang/clang-format.py&lt;cr&gt;


It worked for vim (on the terminal) but not for macvim, in which, when I hit C-k then I get:

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


There seems to exist approaches to solve this on linux

https://askubuntu.com/questions/284957/vi-getting-multiple-sorry-the-command-is-not-available-in-this-version-af

How to solve this on macOS?

Note: https://github.com/rhysd/vim-clang-format helps by providing :ClangFormat.
It may be because you do not have the correct clang-format.py file downloaded. If vim is compiled using python3 then you need a different file because it is in python2. I downloaded a new python file and changed the key mapping recommended by in the clang python file to the following in my .vimrc: 

    map &lt;C-I&gt; :py3file &lt;path-to-this-file&gt;/clang-format.py&lt;cr&gt;
    imap &lt;C-I&gt; &lt;c-o&gt;:py3file &lt;path-to-this-file&gt;/clang-format.py&lt;cr&gt;


This solved the E319 problem I was getting.