As a devotee of vim, I want to put in a vote for trying to make new
releases violate fewer rather than more of existing users' assumptions
(although I know that there are always tradeoffs).
Why should the default color scheme suddenly change when one upgrades?
(Hmm maybe fire suits should go on now.)
Every time I install a new version of vim I have to go and fix some
little thing so that it will work the way I want it to work. The
problems I've experienced recently are due to the fact that I've been
mapping g to 1G for years. In recent releases, matchit.vim (which I
love) and the new fancy file browser have created mappings for g plus
something else, so that vim has to pause when I type g to make sure
that I'm not about to type another character (this is not the behavior
you want for the "go to the top of the file" mapping). I have fixed
these problems, but:
How about adding functions without assigning them to keys? If a key
hasn't been mapped before, then someone has their own private mapping
for it, and by adding a new mapping, you're going to break something,
perhaps for the sake of a function that most people won't use.
(Shouldn't a *network* file browser be optional? I already have more
than one with my operating system. )
Just pet peeves. If I didn't love it so much I wouldn't complain.
Marshall
On Jul 17, 2006, at 7:01 PM, A.J.Mechelynck wrote:
Bill Hollingsworth wrote:
Hi,
I recently upgraded to VIM 7.0 and now the color settings for my PERL
programs are different. I liked the way the colors were before.
Could someone tell me how to return to the old settings, or how to
set the colors myself?
For instance, now comments and variable names are the same color.
Thanks and best wishes,
Bill Hollingsworth
University of Cambridge Computer Laboratory
I guess the easiest way is to write your own colorscheme. For instance
I use the attached colorscheme which I wrote, named
$HOME/.vim/colors/almost-default.vim and invoked by ":colorscheme
almost-default". It is a simple example which might help you create
your own. You will have to find out the names of the highlight groups
for which you need a non-default color. (Try "Comment" and
"Identifier"; I guess changing them will also change perlComment and
PerlIdentifier, or however they are named).
You can set different colors for console Vim and gvim by using, in the
same :highlight command, arguments cterm= ctermfg= ctermbg= on the one
hand, and gui= guibg= guifg= onthe other hand.
There are also a number of colorschemes available in your distribution
(in $VIMRUNTIME/colors) and at vim-online (which can be installed by
dropping them in one of the following:
- system-wide: $VIM/vimfiles/colors
- user-private on Unix: ~/.vim/colors
- user-private on Windows: ~/vimfiles/colors
). Don't change anything in $VIMRUNTIME or its subdirs, because any
upgrade can silently overwrite any changes you made there.
See
:help :highlight
:help :colorscheme
:view $VIMRUNTIME/colors/README.txt
HTH,
Tony.
" Vim color file
" Maintainer: Tony Mechelynck <[EMAIL PROTECTED]>
" Last Change: 2006 Jun 21
" This is almost the default color scheme. It doesn't define the
Normal
" highlighting, it uses whatever the colors used to be.
" Only the few highlight groups named below are defined; the rest
(most of
" them) are left at their compiled-in default settings.
" Set 'background' back to the default. The value can't always be
estimated
" and is then guessed.
hi clear Normal
set bg&
" Remove all existing highlighting and set the defaults.
hi clear
" Load the syntax highlighting defaults, if it's enabled.
if exists("syntax_on")
syntax reset
endif
" Set our own highlighting settings
hi Error guibg=red
guifg=black
hi clear ErrorMsg
hi link ErrorMsg Error
hi StatusLine gui=NONE,bold guibg=red
guifg=white
hi StatusLineNC gui=reverse,bold
hi TabLine gui=NONE guibg=#DDDDDD
guifg=black
hi TabLineFill gui=NONE guibg=#AAAAAA
guifg=red
hi User1 ctermfg=magenta guibg=white
guifg=magenta
hi User2 ctermfg=darkmagenta guibg=#DDDDDD
guifg=magenta
" remember the current colorscheme name
let colors_name = "almost-default"
" vim: sw=2