Hi,
How can I have vi with syntax hilghting for root ? Regular users have it, but not root's.
I've seen the hidden files of a regular user home, but found nothing.
Thanks in advance.
Warm Regards, Mário Gamito
On Fri, Mar 7, 2008 at 12:42 PM, Mário Gamito gamito@gmail.com wrote:
How can I have vi with syntax hilghting for root ? Regular users have it, but not root's.
I've seen the hidden files of a regular user home, but found nothing.
Do "vim file" instead of "vi file". As root "vi" gets you a standard UNIX vi, "vim" gets you the enhanced vi with colors etc.
Regards, Tim
Tim Verhoeven wrote:
On Fri, Mar 7, 2008 at 12:42 PM, Mário Gamito gamito@gmail.com wrote:
How can I have vi with syntax hilghting for root ? Regular users have it, but not root's.
I've seen the hidden files of a regular user home, but found nothing.
Do "vim file" instead of "vi file". As root "vi" gets you a standard UNIX vi, "vim" gets you the enhanced vi with colors etc.
Regards, Tim
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
That's if vim enhanced is installed. Otherwise just install it with yum install vim
Mário Gamito wrote:
How can I have vi with syntax hilghting for root ? Regular users have it, but not root's.
I've seen the hidden files of a regular user home, but found nothing.
1. use vim instead of vi (vi is /bin/vi , which is usually a "tiny" vim with few features) 2. put into /root/.vim : set nocp filetype plugin on syn on
Regards, Chip Campbell
On Fri, Mar 7, 2008 at 6:42 AM, Mário Gamito gamito@gmail.com wrote:
Hi,
How can I have vi with syntax hilghting for root ? Regular users have it, but not root's.
I've seen the hidden files of a regular user home, but found nothing.
yum install vim-common vim-enhanced
On Fri, 7 Mar 2008, Mário Gamito wrote:
Hi,
How can I have vi with syntax hilghting for root ? Regular users have it, but not root's.
I've seen the hidden files of a regular user home, but found nothing.
In /etc/profile.d/vim.sh, comment out the line which contains the following: [ `//usr/bin/id -u` -le 100 ] && return
In my version, it is line 3. Logout and log back in and presto you have colors, assuming you have the proper packages installed.
Make sure you understand the implications of doing this before you do this.
Regards,
Mário Gamito wrote:
Hi,
How can I have vi with syntax hilghting for root ? Regular users have it, but not root's.
I've seen the hidden files of a regular user home, but found nothing.
And one last way if vim-enhanced is installed ...
put this in the /root/.bashrc
alias vi='vim'