Vim doesn't support function name highlighting for C/C++.
This is a simple solution of function highlighting & class highlighting for C/C++, with a Monokai theme maintained by crusoexia/vim-monokai.
- Acknowledgement to @Janosimas.
mkdir -p ~/.vim/colors
Download colors/monokai.vim
file from this repo, and copy to ~/.vim/colors/
.
Copy below command to your ~/.vimrc
:
syntax on
colorscheme monokai
mkdir -p ~/.vim/syntax
Download syntax/c.vim
and copy to ~/.vim/syntax/
; replace the existing file if needed.
The syntax rule will be applied to *.c, *.cc, *.cpp files.