function Sudowrite() execute 'w !sudo tee "%"' endfunction nnoremap w :call Sudowrite()L