:w !sudo tee %
:set noro
:!chmod +w %
:e
:set noreadonly
:q!
vim ~/.vimrc
add set noreadonly
https://vi.stackexchange.com/questions/14073/vim-is-in-read-only-mode
https://unix.stackexchange.com/questions/71109/how-can-i-exit-from-read-only-mode-in-vim