Waffelson@lemmy.world to linuxmemes@lemmy.world · 11 months agoWhen you realized you forgot sudolemmy.worldimagemessage-square32fedilinkarrow-up1370
arrow-up1370imageWhen you realized you forgot sudolemmy.worldWaffelson@lemmy.world to linuxmemes@lemmy.world · 11 months agomessage-square32fedilink
minus-squareBjörn Tantau@swg-empire.delinkfedilinkarrow-up15·11 months agoIs there an editor that can request root privileges without restarting it? That would be quite useful.
minus-squaredjango@discuss.tchncs.delinkfedilinkEnglisharrow-up5·11 months agoSure, you can do this in emacs: https://fuco1.github.io/2017-04-20-Save-write-protected-files-with-sudo-automatically.html
minus-squareEager Eagle@lemmy.worldlinkfedilinkEnglisharrow-up4·edit-211 months agomicro ftw, no need to even memorize a command, it’ll just ask if you want to use sudo
minus-squareBotzo@lemmy.worldlinkfedilinkarrow-up4·11 months agoIt’s a simple trick in Vim: https://stackoverflow.com/a/7078429 For the lazy: :w !sudo tee > /dev/null %
minus-squarehex_m_hell@slrpnk.netlinkfedilinkarrow-up4·edit-211 months agoYeah, in emacs you use tramp to open the file with /sudo::
minus-squareYodaDaCoda@sh.itjust.workslinkfedilinkEnglisharrow-up4·11 months agokate does this in KDE, but it’s not cli.
Is there an editor that can request root privileges without restarting it? That would be quite useful.
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
micro ftw, no need to even memorize a command, it’ll just ask if you want to use sudo
It’s a simple trick in Vim:
https://stackoverflow.com/a/7078429
For the lazy:
:w !sudo tee > /dev/null %
Yeah, in emacs you use
tramp
to open the file with/sudo::
(n)vim + suda.vim.
kate
does this in KDE, but it’s not cli.