Have you ever made this mistake…
You open a config file with READ permissions, but needed to WRITE changes elevated (with “root” permissions)?
Here’s the perfect solution:
:write !sudo tee %
And here’s my full break down of the command:
Have you ever made this mistake…
You open a config file with READ permissions, but needed to WRITE changes elevated (with “root” permissions)?
Here’s the perfect solution:
:write !sudo tee %
And here’s my full break down of the command: