[Tutor] IDLE as battery included

dman dsh8290@rit.edu
Mon, 26 Nov 2001 20:57:34 -0500


On Mon, Nov 26, 2001 at 05:42:57PM -0800, Kirby Urner wrote:
| At 05:20 PM 11/26/2001 -0800, Kirby Urner wrote:
| 
| >>Just this:
| >>
| >>augroup Python
| >>     au!
| >
| >
| >What's this "au" language?  Looks like French.  Do
| >we have to program Vim in French then (I'm rusty)?

It is "vi(m) script".  Use ":help <cmd>" to see more details on it
(such as what Andrei posted).

| Anyway, I followed your instructions and the syntax
| highlighting appears to work great, though I might
| want to change the colors (to match IDLE's :-D).
| Also, I went into python.vim in the syntax folder
| and added 'yield' as a keyword (2.2).

This is part of the power of Open Source - you can fix your own copy.
This will likely be fixed in the next release also, since Neil
Schemenauer is the maintainer of that syntax file.

| ... I see this color schemes thing, which lets me
| pick from a list.  Very cool to have "convert to HTML"
| reproduce those colors faithfully.  So is there a way
| to duplicate the IDLE colors, e.g. keywords are orange,
| strings forest green?  White background?  Clues?

See the "highlight" command.  For me, I like a black background with a
not-quite-white foreground.  In my .vimrc I have

    highlight Normal guibg=black guifg=grey90
    set background=dark

the first line says that the highlighting for items that are in the
"Normal" group should have black as the background and grey90 as the
foreground.  That only affects the gui though, if vim is run in a
console it has no control over that (my gnome-terminal has the same
settings though).  The second line tells it to adjust the palette used
for coloring so that it is readable with a dark background.  You can
see the effect by switching between "bg=dark" and "bg=light", try it
with each background.

I am certain that you can specifiy the colors to use for any given
highlight group to get the colors you prefer.  I see the command
"colorscheme" mentioned right below the "highlight" command in the
help file.  That will likely be helpful to you as well.

-D

-- 

If your company is not involved in something called "ISO 9000" you
probably have no idea what it is.  If your company _is_ involved in ISO
9000 then you definitely have no idea what it is.
                                (Scott Adams - The Dilbert principle)