Problem with vim when logged in as root
I guess the reason is that your home directory ~
is changed, where contains vim configuration file .vimrc
.
Normally ~
is /root
if you login as root, and is /home/YOURNAME
if you login as YOURNAME.
Maybe you are using vi
to try to start VIM which will not use /etc/vimrc
.
If that is the case, you have two options:
- Use
vim
- Modify
/etc/profile.d/vim.sh
to setvi
as an alias for all users not only for users with auid
>=100