Questions tagged [sudo]
The sudo tag has no usage guidance.
6
questions
0
votes
0answers
8 views
How to debug Go code with Vimspector and delve as root?
I'm debugging some Go code with delve being called from the Vimspector plugin which generally works quite nice. I now have a situation where I would need to debug with being root. I've found this ...
0
votes
0answers
22 views
nvi: how to define a new command to write using sudo
In Vim, I can define the following command for writing a file using sudo:
command! W :execute ':silent w !sudo tee % > /dev/null' | :edit!
How do I define a similar command in nvi for saving using ...
2
votes
3answers
1k views
Saving a non user file with NeoVim, eg root owned /etc/pulse/default.pa
I am using NeoVim v0.4.3.
This is the latest version available in repository.
I have an Arch build with the most up to date packages and kernel 5.6.4-arch1-1.
Occasionally I edit a file with nvim ...
2
votes
2answers
5k views
How to open a file as sudo from within vim?
After opening vim as normal user. Is it possible to open a new file as sudo user? like for example in :e file.
5
votes
1answer
828 views
How can I automate filetype detection when using sudoedit?
sudoedit/sudo -e is often used for safely editing files as root. The way it works:
sudoedit copies the named files to temporary files
Then it opens the temporary files using the commands specified by ...
2
votes
1answer
860 views
How do I preserve my colorscheme when I sudo to root?
I have many users who sudo to root to edit certain files. How can I allow each of them to use their own ~/.vimrc file once they have sudo'd to root? In other words. they each want to use their own ...