You're viewing a single thread.
Is there an editor that can request root privileges without restarting it? That would be quite useful.
15 0 ReplyIn vim, in normal mode you can do:
:w !sudo tee %
11 0 ReplyApparently 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.
3 1 Reply??? I used this in neovim twice today
:w !sudo tee %
then reload when it asks.1 0 Reply
i use micro
9 0 ReplySure, you can do this in emacs: https://fuco1.github.io/2017-04-20-Save-write-protected-files-with-sudo-automatically.html
5 0 ReplyIt's a simple trick in Vim:
https://stackoverflow.com/a/7078429
For the lazy:
:w !sudo tee > /dev/null %
5 0 ReplyYeah, in emacs you use
tramp
to open the file with/sudo::
4 0 Replymicro ftw, no need to even memorize a command, it'll just ask if you want to use sudo
4 0 Replykate
does this in KDE, but it's not cli.4 0 Reply(n)vim + suda.vim.
4 0 Reply