VI Line Number Problem
Greetings all,
I needed to have line numbers when I either edit or create new members with VI I created the file .vimrc in /home/myuserid and included the line ‘set num’ (no quote marks) and it worked fine. However when I do an su on my user id to do administrative tasks and have to use VI the line numbers no longer appear. I'm using CentOS 6.3 and Gnome. How can I resolve this problem? Thanks |
The .vimrc file you created is only used by that specific user (/home/myuserid).
You have 2 possibilities: 1) also create a .vimrc for the root user, 2) make it global for all users and add it to /etc/vimrc |
Thanks druuna,
Do I need a '.' in front of the vimrc file (.vimrc) in the etc directory? |
Quote:
The dot version (.vimrc) is only used in the users/root home-directory. Isn't there a /etc/vimrc already? Most distro have one (maybe it is stored in /etc/vim/vimrc, do check). |
druuna,
There is a vimrc file in the etc directory and it is a script. which I backed up and add the set nu line. Logged off and back on did a vi test but on line numbers but it didn't work. I found a file in the etc directory called virc backed it up and add the set nu line to the active virc file and now when I su to root or just su the line numbers are there. Thank you again for leading me down the right path. |
All times are GMT -5. The time now is 06:06 AM. |