VimでRead onlyのテキストを保存する

以下のようにする。
http://stackoverflow.com/questions/2600783/how-does-the-vim-write-with-sudo-trick-work

:w !sudo tee % >/dev/null

.vimrcに以下を追加すると、w!!でコマンドが展開される。

" Allow saving of files as sudo when I forgot to start vim using sudo.
cmap w!! w !sudo tee > /dev/null %