How can I edit the default vimrc file? (it's read only, and chown and chmod says 'operation not permitted')

Solution 1:

This would be a System Integrity Protection (SIP) issue. See About System Integrity Protection on your Mac. Error message shown below is often displayed when SIP prevents a command from executing.

Operation not permitted

Basically, you need to either temporarily disable SIP or edit the file while booted to macOS Recovery.