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@domian:~]$ echo $TERM xterm
Thanks in advance,
Regards, Israel
Around 02:49pm on Friday, December 07, 2007 (UK time), israel.garcia@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
On Fri, 7 Dec 2007, israel.garcia@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@domian:~]$ echo $TERM xterm
Check if you have vim-enhanced installed and use the command vim, not just vi as root.
... a single user question results in 5 answers within the same minute.
On Fri, Dec 07, 2007 at 09:49:39AM -0500, israel.garcia@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
On Dec 7, 2007, at 9:49 AM, israel.garcia@cimex.com.cu <israel.garcia@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@domian:~]$ echo $TERM xterm
Thanks in advance,
Regards, Israel
Check 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@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?
On Dec 7, 2007 9:49 AM, israel.garcia@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@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@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@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 Rainer
israel.garcia@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@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@ftp.home.vim.org (use your userid@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
On Dec 7, 2007 11:30 AM, Charles E Campbell Jr charles.e.campbell@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.
Jon Stanley wrote:
On Dec 7, 2007 11:30 AM, Charles E Campbell Jr charles.e.campbell@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