Re: [CentOS] Colors in vi for user root
Erek Dyskant [EMAIL PROTECTED] wrote: This was discussed previously soon after CentOS 5.0 was released. The upstream distribution changed root from using vim (with syntax highlighting) to using vi. With the 4.X versions root was using vim. The 5.X configuration is: [EMAIL PROTECTED] ~]# which vi /bin/vi [EMAIL PROTECTED] ~]# which vi vi: aliased to vim [EMAIL PROTECTED] ~]# which vim /usr/bin/vim In theory, programs in /bin are statically linked, so they work even when you have library issues going on. Anyway, just use the vim command explicitly or add alias vi=vim to your ~root/.profile The static linking part is no longer true: [EMAIL PROTECTED] ~]# ls -l /bin/vi -rwxr-xr-x 1 root root 628808 May 9 2007 /bin/vi [EMAIL PROTECTED] ~]# file /bin/vi /bin/vi: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped I would guess that any shared libraries used by vi are in or under /lib. That way the required libraries should also always be available. Just for comparison, the executable for vim is quite a bit bigger: [EMAIL PROTECTED] ~]# ls -l /usr/bin/vim -rwxr-xr-x 1 root root 2817056 May 9 2007 /usr/bin/vim This is just another example of the upstream distribution being very conservative for possibly several different reasons. There are also a number of ways to override their choice. I just wanted to point out that the change from vim to vi for root was intentional. Someone changing it back should understand the implications of what they're doing. Cheers, Dave -- Politics, n. Strife of interests masquerading as a contest of principles. -- Ambrose Bierce ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Colors in vi for user root
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' signature.asc Description: OpenPGP digital signature ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] Colors in vi for user root
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 ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Colors in vi for user root
On Fri, Mar 7, 2008 at 12:42 PM, Mário Gamito [EMAIL PROTECTED] 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 - [EMAIL PROTECTED] - 0479 / 88 11 83 Hoping the problem magically goes away by ignoring it is the microsoft approach to programming and should never be allowed. (Linus Torvalds) ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Colors in vi for user root
Mário Gamito wrote: Hi, How can I have vi with syntax hilghting for root ? Regular users have it, but not root's. :sy on also works for root, but the automatical stuff has been taken out of vim for the root user (too dangerous to automatically run stuff). Cheers, Ralph pgpBiwNrsmcKF.pgp Description: PGP signature ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Colors in vi for user root
Tim Verhoeven wrote: On Fri, Mar 7, 2008 at 12:42 PM, Mário Gamito [EMAIL PROTECTED] 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 -- Kind Regards Rudi Ahlers CEO, SoftDux Web: http://www.SoftDux.com Check out my technical blog, http://blog.softdux.com for Linux or other technical stuff, or visit http://www.WebHostingTalk.co.za for Web Hosting stugg ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Colors in vi for user root
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 ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Colors in vi for user root
do you have the vim-enhanced package installed? -- Original message from Charles E Campbell Jr [EMAIL PROTECTED]: -- 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 ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Colors in vi for user root
On Fri, Mar 7, 2008 at 6:42 AM, Mário Gamito [EMAIL PROTECTED] 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 -- -matt ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos