This patch for vim 6.1-6.2 allows background images under Windows
Screenshot
You could use a less boring background than this one, but I have simple tastes.
Download
- Here is the patch. Apply it to the 6.2 vim source package for Windows.
- Here is the old patch. Apply it to the 6.1 vim source package for Windows.
- Here is a readymade binary of gvim.exe. It is compiled with GUI, OLE, IME and 'big' features. Please back up your old binary if you decide to use this one.
- Here is an old binary of gvim.exe (version 6.1).
- Here is a background texture that works well with my Borland-esque color scheme.
Documentation
Either overwrite your gvim exe with the one above, or apply the patch to vim source and compile. This results in a vim with FEAT_BMBG (bitmap background) enabled. The output of
:echo has("bmbg") should be '1', and
:version should include '+bmbk' in its output.
When the GUI is initialized, gvim will look for a file in
bitmaps/background.bmp under the vim runtime directory (e.g. c:\vim\vim62\runtime). Yes, the name of the file is hardcoded because this is Not A Real Patch.
Remarks
To me, textured backgrounds are almost a necessity. The illusion of depth seems to make it much easier for the eyes to rest on the editor windows hour after hour. However, the Vim Spirit seems not to agree with me so I decided not
to bother making a real, proper patch. For now, I am keeping this rather rough one on the web because there doesn't seem to be any other way for people to get textured backgrounds in gvim without programming.
The only changes the patch makes are:
- Add functions to gui_w32.c to load the bitmap image
- Change the two places in gui_w32.c where background is drawn, and add a line to load the bitmap at startup
- Add a new feature, FEAT_BMBG, to the feature lists
- Change the two places in screen.c where scrolling is handled, to force a redraw if bitmaps are being used
Obviously it would be a good thing to add an option containing the path to the bitmap file (empty for no bitmap). However, as I said, this isn't a
real patch.