You are not logged in.

#1 2024-03-05 19:36:31

dem0ngo
Member
Registered: 2024-03-05
Posts: 2

[SOLVED] How to use user config with "sudo nvim"

I am having trouble figuring this out. I have been using Kali in the past with no issues but just switched to Arch. When I got my configs for stuff like nvim set up I noticed that when I run

sudo nvim foot.ini

it does not use my configuration files. From what I understand this is intended in some cases, but even with

sudoedit foot.ini

I am told that "sudoedit: foot.ini: editing files in a writable directory is not permitted"... I've never had to change permissions to edit config files before but maybe I'm missing something.

I have also used visudo to uncomment the line

%wheel ALL=(ALL:ALL) ALL

which doesn't seem to have fixed anything. I would really appreciate help on this so I can continue getting things set up. Let me know if you need any other info, thanks!

Last edited by dem0ngo (2024-03-07 18:29:12)

Offline

#2 2024-03-05 22:15:06

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,024

Re: [SOLVED] How to use user config with "sudo nvim"

You don't and this has nothing to do with sudo - sudo will run nvim as root and the root users config etc. is used.
But you don't.
The proper approach is sudoedit.

However not in this case: https://man.archlinux.org/man/sudo.8.en#editing
Why are you trying to edit that file as root/using sudo?

Online

#3 2024-03-07 18:28:58

dem0ngo
Member
Registered: 2024-03-05
Posts: 2

Re: [SOLVED] How to use user config with "sudo nvim"

Nevermind, I was severely confused. Turns out I did have rw permissions on config files on Kali I just didn't remember. Once I changed that on Arch everything worked. Apologies for the late response.

Offline

Board footer

Powered by FluxBB