mac may differ from linux.
macos will be built vim and vi, but no syntax highlighting.
Find vimrc file location: macos usually in / usr / share / vim path, ie / usr / share / vim / vimrc. If you can not find this path, open vim, then execute: scriptname, you can see a bunch of the path, a path that is usually the first vimrc path.
Configuration Syntax highlighting: sudo vi / usr / share / vim / vimrc, enter the edit mode you can add syntax on, you're done!
Reproduced in: https: //www.cnblogs.com/xu-thinking/p/3637521.html