@Waffelson to linuxmemes • 9 months agoWhen you realized you forgot sudoimagemessage-square43arrow-up1374arrow-down118
arrow-up1356arrow-down1imageWhen you realized you forgot sudo@Waffelson to linuxmemes • 9 months agomessage-square43
minus-squareBjörn Tantaulinkfedilink15•9 months agoIs there an editor that can request root privileges without restarting it? That would be quite useful.
minus-square@[email protected]linkfedilink11•9 months agoIn vim, in normal mode you can do: :w !sudo tee %
minus-squarez3rOR0nelinkfedilink2•9 months agoApparently 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.
minus-squaredream_weasellinkfedilink1•9 months ago??? I used this in neovim twice today :w !sudo tee % then reload when it asks.
minus-square@[email protected]linkfedilinkEnglish5•9 months agoSure, you can do this in emacs: https://fuco1.github.io/2017-04-20-Save-write-protected-files-with-sudo-automatically.html
minus-square@Botzolink5•9 months agoIt’s a simple trick in Vim: https://stackoverflow.com/a/7078429 For the lazy: :w !sudo tee > /dev/null %
minus-squareEager EaglelinkEnglish4•edit-29 months agomicro ftw, no need to even memorize a command, it’ll just ask if you want to use sudo
minus-square@[email protected]linkfedilinkEnglish4•9 months agokate does this in KDE, but it’s not cli.
minus-square@[email protected]linkfedilink4•edit-29 months agoYeah, in emacs you use tramp to open the file with /sudo::
Is there an editor that can request root privileges without restarting it? That would be quite useful.
In vim, in normal mode you can do:
: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.i use micro
Sure, you can do this in emacs: https://fuco1.github.io/2017-04-20-Save-write-protected-files-with-sudo-automatically.html
It’s a simple trick in Vim:
https://stackoverflow.com/a/7078429
For the lazy:
:w !sudo tee > /dev/null %
micro ftw, no need to even memorize a command, it’ll just ask if you want to use sudo
(n)vim + suda.vim.
kate
does this in KDE, but it’s not cli.Yeah, in emacs you use
tramp
to open the file with/sudo::