When you realized you forgot sudo
When you realized you forgot sudo
:w !sudo tee %
Apparently that doesn’t work in NeoVim, so recently I installed the suda plugin.
Personally, I just doas nvim and then the file name that needs root access, but it’s a handy plugin in case I forget.
??? I used this in neovim twice today
:w !sudo tee % then reload when it asks.
kate does this in KDE, but it’s not cli.
tramp to open the file with /sudo: