The Stripey Site

Sample Configuration Files

Most of this site consists of suggestions for configuring Vim in various ways. These are all contained in the two configuration files, .vimrc and .gvimrc.

Or to put it another way round, my Vim configuration files are available, and this site as a whole explains what they do and why they do it. See the links from the main page for explanations of particular sections.

As might be expected, things to do with Vim’s gui are in .gvimrc (which should be renamed to _gvimrc on Windows and the like), while all the other settings, mappings, functions, etc, are all in .vimrc (aka _vimrc).

At 743 lines long, my .vimrc is fairly substantial, but this is not as bad as it sounds — 150 of them are blank, and 311 of them are explanatory comments, while a further 125 contain function definitions (which it isn’t necessary to understand in order to be able to use).

The .vimrc provided here is the one I actually use. It works with Vim version 5·6 (the latest version at the time of writing) cos that’s the version I use. So far as I’m aware it ought to work with 5·5 but I haven’t tested it. With 5·4 the textual version of the backspace option won’t work, but must other things probably will. Versions older than that don’t have the mechanism for file type detection, so many things won’t work. It’s worth upgrading to the latest version, anyway.

The only options included are the ones that are changed; anything left at its default setting is omitted. As such, while the file provides an example of what can be done with Vim, it is not a comprehensive guide to every setting you might ever want to play with (for that, see Sven Guckes’s .vimrc).

It probably isn’t sensible just to copy my .vimrc in its entirety without reading through it all. You are not me. We are different, and I don’t want to be held responsible for messing up something which used to work until you adopted my settings! Having said that, the file is divided up into sections which should work fairly independently, and the copious comments should help if something does go wrong. Good luck!


Feedback is welcome via vim-www@stripey.com. © Copyright 2000 — see copying information for details.