3 ms·
" Use w!! to sudo save after file is already opened cmap w!! w !sudo tee % >/dev/null See Nathan Long's awesome answer for an explanation: http://stackoverfl
by npongratz 14y ago
" Use w!! to sudo save after file is already opened
cmap w!! w !sudo tee % >/dev/null
See Nathan Long's awesome answer for an explanation:
http://stackoverflow.com/questions/2600783/how-does-the-vim-write-with-sudo-trick-work http://stackoverflow.com/questions/2600783/how-does-the-vim-...