vim and clang-format integration issue

I am trying to setup my vim with clang-format, on centos 6.5 using http://clang.llvm.org/docs/ClangFormat.html

Here are the steps and configs

  1. Yum install clang

  2. copied clang-format.py to my home dir /home/nitin

  3. I have .vimrc in my home directory. added following lines:
    map :pyf /home/nitin/clang-format.py
    imap :pyf /home/nitin/clang-format.py

  4. When i open source file in vim and try to Ctrl+k, vim says command is not available in this version

Can somebody help me here?

Thanks

Nitin

I am trying to setup my vim with clang-format, on centos 6.5 using http://clang.llvm.org/docs/ClangFormat.html

Here are the steps and configs

  1. Yum install clang

  2. copied clang-format.py to my home dir /home/nitin

  3. I have .vimrc in my home directory. added following lines:
    map :pyf /home/nitin/clang-format.py
    imap :pyf /home/nitin/clang-format.py

  4. When i open source file in vim and try to Ctrl+k, vim says command is not available in this version

Can somebody help me here?

Thanks

Nitin

I have not seen that particular error before, but it sounds like your vim might be compiled without python support?

Hi Daniel

You were totally correct. I added python support. It is working fine now

Thanks

Nitin