Maybe, it's stupid question but I've just installed CentOS5 and when I'm going to edit some of my conf files I see no colors as it did in old CentOS4x... I'm using: [root at domian:~]$ echo $TERM xterm Thanks in advance, Regards, Israel
Around 02:49pm on Friday, December 07, 2007 (UK time), israel.garcia at cimex.com.cu scrawled:> Maybe, it's stupid question but I've just installed CentOS5 and when I'm > going to edit some of my conf files I see no colors as it did in old > CentOS4x...Did you setup/restore a .vimrc file, including one for root if that is the user you are editing from. Steve -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting a bad thing? 14:54:18 up 69 days, 1:50, 1 user, load average: 0.09, 0.07, 0.07 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20071207/b9909bfc/attachment-0003.sig>
On Fri, 7 Dec 2007, israel.garcia at cimex.com.cu wrote:> Maybe, it's stupid question but I've just installed CentOS5 and when I'm > going to edit some of my conf files I see no colors as it did in old > CentOS4x... > I'm using: > > [root at domian:~]$ echo $TERM > xtermCheck if you have vim-enhanced installed and use the command vim, not just vi as root. -- -- dag wieers, dag at centos.org, http://dag.wieers.com/ -- [Any errors in spelling, tact or fact are transmission errors]
On Fri, Dec 07, 2007 at 09:49:39AM -0500, israel.garcia at cimex.com.cu wrote:> Maybe, it's stupid question but I've just installed CentOS5 and when I'm > going to edit some of my conf files I see no colors as it did in old > CentOS4x...Did you install vim-enhanced? yum -y install vim-enhanced vim-X11 # for gvim, also -- lfr 0/0 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20071207/8a26efd2/attachment-0003.sig>
On Dec 7, 2007, at 9:49 AM, <israel.garcia at cimex.com.cu> <israel.garcia at cimex.com.cu > wrote:> Maybe, it's stupid question but I've just installed CentOS5 and when > I'm > going to edit some of my conf files I see no colors as it did in old > CentOS4x... > I'm using: > > [root at domian:~]$ echo $TERM > xterm > > Thanks in advance, > > Regards, > IsraelCheck to make sure you have vim-enhanced installed. # rpm -qa|grep vim vim-enhanced-7.0.109-3.el5.3 vim-common-7.0.109-3.el5.3 vim-minimal-7.0.109-3.el5.3 That worked for me.
israel.garcia at cimex.com.cu wrote:> Maybe, it's stupid question but I've just installed CentOS5 and when I'm > going to edit some of my conf files I see no colors as it did in old > CentOS4x... >vi and vim are two different commands. vi (no colour) is usually an alias for vim (syntax colour). Does vim give you syntax colours? -- Kevin Thorpe Head of IT
On Dec 7, 2007 9:49 AM, <israel.garcia at cimex.com.cu> wrote:> Maybe, it's stupid question but I've just installed CentOS5 and when I'm > going to edit some of my conf files I see no colors as it did in old > CentOS4x... > I'm using: > > [root at domian:~]$ echo $TERM > xterm > > Thanks in advance, > > Regards, > Israel >If you start vim with no filename, just 'vi' (or 'vim') do you see blue coloring in the about box? If so, once you open your files, you might want to try ":syntax enable", and see if that gives you the colors.
israel.garcia at cimex.com.cu schrieb:> Maybe, it's stupid question but I've just installed CentOS5 and when I'm > going to edit some of my conf files I see no colors as it did in old > CentOS4x... > I'm using: > > [root at domian:~]$ echo $TERM > xtermTake a look at: # cat /etc/profile.d/vim.sh if [ -n "$BASH_VERSION" -o -n "$KSH_VERSION" -o -n "$ZSH_VERSION" ]; then [ -x /usr/bin/id ] || return [ `/usr/bin/id -u` -le 100 ] && return # for bash and zsh, only if no alias is already set alias vi >/dev/null 2>&1 || alias vi=vim fi So you do not get vim for root... Hth Rainer
israel.garcia at cimex.com.cu wrote:>Maybe, it's stupid question but I've just installed CentOS5 and when I'm >going to edit some of my conf files I see no colors as it did in old >CentOS4x... >I'm using: > >[root at domian:~]$ echo $TERM >xterm > >Check if your vi/vim has syntax highlighting enabled: vi --version | fgrep syntax If -syntax is on the line, you don't have syntax highlighting compiled in. - Did you install vim-enhanced, and does the command "vi" use it? - Try "vim" instead. - If you didn't install vim-enhanced, I suggest getting the vim source, preferably applying the patches, and compiling it yourself: 1. ftp anonymous at ftp.home.vim.org (use your userid at hostname for the password) 2. cd pub/vim/unix 3. binary 4. get vim-7.1.tar.bz2 5. quit 6. (pick a suitable directory to have vim71 under), and bunzip2 vim-7.1.tar.bz2 7. tar -xf vim-7.1.tar 8. cd vim71 9. configure --with-features=huge 10. make 11. go to superuser mode 12. cd src 13. make install If +syntax is on the line, you do have syntax highlighting available. - Does your .vimrc turn on "non-compatability"? - Does your .vimrc have syntax highlighting enabled? As a minimal .vimrc, I suggest having the following in your <.vimrc>: set nocp if version >= 600 filetype plugin indent on endif Regards, Chip Campbell
Please check the changlelog for vim, RH backports patches, so on a RH system, vim install will not be the same as the officially released version of the same number. -Ross -----Original Message----- From: centos-bounces at centos.org <centos-bounces at centos.org> To: CentOS mailing list <centos at centos.org> Sent: Fri Dec 07 13:04:13 2007 Subject: Re: [CentOS] Where are my VIM colors? Jon Stanley wrote:>On Dec 7, 2007 11:30 AM, Charles E Campbell Jr ><charles.e.campbell at nasa.gov> wrote: > > > >> - If you didn't install vim-enhanced, I suggest getting the vim >>source, preferably applying the patches, and compiling it yourself: >> >> > >Why? There would be nothing that we could do to support anything >compiled form source. I attempt to discourage it as much as possible. > >* many (usually hundreds) of bugs from any earlier releases have been fixed if one is using an earlier release * applying patches fixes yet more bugs (currently there are 170 patches to vim 7.1) (admittedly, I didn't specify how to apply patches) * runtime files have been updated (generally to fix bugs) * there are options associated with the configure, such as whether to have ruby, perl, cscope, Sun workshop, etc support compiled in (see configure --help for the list) * if one wants support for vim, there's an active mailing list for it with many knowledgable folks, including vim's author (see http://vim.sf.net/ for details) Regards, Chip Campbell _______________________________________________ CentOS mailing list CentOS at centos.org http://lists.centos.org/mailman/listinfo/centos ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20071207/873dd011/attachment-0003.html>
Rainer Traut <tr.ml at gmx.de> wrote:> israel.garcia at cimex.com.cu schrieb: > >> > Maybe, it's stupid question but I've just installed CentOS5 and when I'm >> > going to edit some of my conf files I see no colors as it did in old >> > CentOS4x... >> > I'm using: >> > >> > [root at domian:~]$ echo $TERM >> > xterm >> > > Take a look at: > > # cat /etc/profile.d/vim.sh > if [ -n "$BASH_VERSION" -o -n "$KSH_VERSION" -o -n "$ZSH_VERSION" ]; then > [ -x /usr/bin/id ] || return > [ `/usr/bin/id -u` -le 100 ] && return > # for bash and zsh, only if no alias is already set > alias vi >/dev/null 2>&1 || alias vi=vim > fi > > So you do not get vim for root... > > Hth > RainerRight answer. I just checked on my CentOS 4.5 box and: [root at fraud default]# which vi alias vi='vim' /usr/bin/vim but on my CentOS 5.1 box root gets: [root at bend etc]# which vi /bin/vi while users get: [dave at bend ~]# which vi vi: aliased to vim So vim is probably correctly installed on the 5.1 box but root no longer gets an alias to it. This is actually correct since root should be able to log in and have full functionality with just the programs in /bin, /sbin, etc. In particular, root shouldn't be dependent on anything under /usr. Cheers, Dave -- Politics, n. Strife of interests masquerading as a contest of principles. -- Ambrose Bierce