4 ms·
Probably my biggest overall timesaver has been: :w !sudo tee % If you neglected to sudo before making your changes.
by dogecoinbase 12y ago
Probably my biggest overall timesaver has been:
:w !sudo tee %
If you neglected to sudo before making your changes.
- mattikus 12y agoI've had this in my vimrc for years: " Let :w!! gain sudo privileges without closing and reopening vim cmap w!! w !sudo tee % >/dev/null
- mkagenius 12y agoIts much more easier to remember when you know how that actually works. Here is link explaining how that actually works: http://stackoverflow.com/questions/2600783/how-does-the-vim-write-with-sudo-trick-work http://stackoverflow.com/questions/2600783/how-does-the-vim-...