[SATLUG] vi editor and insert mode as regular user

John D Choate jdchoate at gmail.com
Fri Jul 24 15:11:15 CDT 2009


> 1.  Make sure you are using the same program as both user and root:
> 
> $ ls -l `which vi`
> lrwxrwxrwx 1 root root 3 Nov 23  2005 /usr/bin/vi -> vim
> 
> $ ls -l `which vim`
> -rwxr-xr-x 1 root root 1683300 Mar 31 19:49 /usr/bin/vim
> 
> $ alias
> alias svi='sudo vim'
> 
> 
> 2.  Make sure that there are no differences in /root/.vimrc and the user's .vimrc.
> 
>    -- Bruce
> 
> 

Ok... here's what I got.

$ ls -l `which vi`
lrwxrwxrwx 1 root root 21 2009-05-09 17:21 /usr/bin/vi -> /etc/alternatives/uvi*

$ ls -l `which vim`
lrwxrwxrwx 1 root root 21 2009-05-09 17:21 /bin/vim -> /etc/alternatives/vim*


Also, /root has .vimrc, but no .vimrc is in any users' ~/
There is no ~/.vi* at all for that matter.
So, I will clone /root/.vimrc in ~/ and see what happens.


More information about the SATLUG mailing list