我一直在努力成为一个好的小系统管理员,并在更改根拥有的文件(例如 /etc/profile)时使用 sudoedit,而不是 sudo vim 或 sudo -i;vim,但我的 vim colorcheme 似乎没有使用 sudoedit 时正确显示。
colorceme 加载正确(通过 :color 检查)。我已经确认它没有为 root 提取颜色方案,因为从 root 执行 sudoedit 时也会出现问题,颜色不同,即使它显示相同的方案。
使用:
编辑:
VIM 正在运行:
ubuntu@ip-10-0-0-104:~$ ps -f -u ubuntu
UID PID PPID C STIME TTY TIME CMD
ubuntu 4433 4345 0 19:18 ? 00:00:00 sshd: ubuntu@notty
ubuntu 6109 6021 0 20:47 ? 00:00:00 sshd: ubuntu@pts/0
ubuntu 6110 6109 0 20:47 pts/0 00:00:00 -bash
ubuntu 6233 6232 0 20:48 pts/0 00:00:00 /usr/bin/vim /var/tmp/profile.XXQiLoee …Run Code Online (Sandbox Code Playgroud)