1

I am trying to write to a vim file, fortran.vim. I gave myself access to root following these guidelines. I also saw this SO post, but the answers did not help.

sh-3.2# ls -l fortran.vim
-rw-r--r--  1 root  wheel  4043 Sep  9  2010 fortran.vim
sh-3.2# whoami
root

root seems to have read/write access to the file, and I am indeed logged in as root. Any idea what the problem is here?

Update after comments:

  1. :w! doesn't work
  2. I am in directory /usr/share/vim/vim73/ftplugin/
  3. Running ls -dl returns: drwxr-xr-x 178 root wheel 6052 May 1 2014 .
  • You don't actually need to enable the root user, sudo -s from any account with admin privileges gives you a root shell as well. But this is not directly related to your problem. – nohillside Dec 26 '16 at 21:28
2

Files in /usr are protected by SIP, see What is the "rootless" feature in El Capitan, really? for details. vim should be able to read config files from user-writable directories as well, man vim has the details.

  • mhm I'm getting to hate any apple product more and more... so much restrictions! Thanks – solalito Dec 26 '16 at 21:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .