Last Updated: February 25, 2016
·
503
· 03lafaye

Write to read-only file from within VIM

:w !sudo tee %

1 Response
Add your response

I usually map it, eg

cmap w!! w !sudo tee % >/dev/null<CR>
over 1 year ago ·