... Kent's Vim Page



Vim is Vi-IMproved, a free (charityware) vi text editor work-alike with many extensions and great features such as multi-level undo, multiple file windows and buffers, flexible insert mode (use the arrow keys to move while in insert mode), visual mode (execute commands on highlighted areas of text), block operators (operate on rectangular blocks of text), folding, and an online help system. Vim is well worth a try, even if you hate vi (try easy mode: vim -y or gvim -y), and especially if you love vi but would like to eliminate some of vi's limitations, such as limited line length or single-level undo.

If you don't know what "vi" is, my more generic vi Information & Resources page will give a brief introduction and some links to further sources of information.

I've come a long way down the vi trail since 1990...vi, xvi, elvis, vile, xvile, nvi, and now, Vim, which I use almost every day. I have found Vim to be a most useful, efficient, and enjoyable editor. Here is a screen shot (16K PNG) of how Vim 6.1.320 compiled with GTK GUI looks on my FreeBSD system running the XFree86 XWindow server and fvwm95 (vim has user-customizable color schemes. If you don't like a dark background, it can be easily changed--by default vim installs with a white background).

A huge plus with Vim for me is: I'm able to use the same version of Vim under WinXP, Vista, and Unix, thus eliminating any jarring mental shifts that come from using editors with different interfaces when switching development platforms.

Vim is under active and ongoing development. Vim 7.1 is the most recent stable release. This new version (compared to Vim from the v4.6 era) offers customizable color syntax highlighting/coloring for many programming languages and filetypes, a choice of graphical interfaces (such as gvim on Unix using Athena, Motif, or GTK), pull-down menus, toolbar, folding, its own scripting language, user functions, viewing colorized differences between files, spell-checking, multi-byte printing, omni-completion for structs/classes/objects, highlighting the line the cursor is on, tabbed editing, and the ability to include Perl, Python, MzScheme, TCL/TK and/or Ruby as an interpreter that can be used to modify files in the editor.

You can find four examples here of how I've been using Vim [567].x's color syntax highlighting features on my Kent's Vim Syntax Files page. Note that none of these are official. In fact, if anyone uses SPSS statistical software as well as Vim and would like to take over maintainership of my SPSS highlighting definition for Vim, drop me a line. It would be nice to get this into the official distribution of Vim, but I don't use SPSS any longer and haven't had any opportunity to update and test sps.vim.

Comments and suggestions about this Vim page are welcome.

--Kent Nassen, knassen AT umich DOT eee dee you

Here are some links to further information about Vim.

The VIM Home Page
(http://www.vim.org/)

This site is the main repository for Vim-related information, a SourceForge repository of Vim tips and scripts, including plugins and color schemes. This site is the central place for useful user-submitted scripts and tips for Vim. There are hundreds tips! This is a definite must see for Vim users!

Downloading Vim
(http://vim.sf.net/download.php)

Where to find Vim for your system.

Dr. Chip's Vim Page
(http://mysite.verizon.net/astronaut/vim/)

Syntax highlighting files (including for TeX/LaTeX, Maple, and Lisp), scripts, and spell-checking for Vim.

Vince Negri's Vim Patches
(http://vince.negri.googlepages.com/)

Conceal/Ownsyntax patches for vim 7.0.x and 6.4.x. See Vince's explanation which includes screen shots of how the patches affects Vim editing.

Cream
(http://cream.sourceforge.net/)

"A modern configuration of the powerful and famous Vim...".

Hacking Vim
(http://www.packtpub.com/Vim/book)

The book "Hacking Vim: A cookbook to get the most out of the latest Vim editor" by Kim Schulz (Packt Publishing, 2007, 210pp, illustrated) provides a number of tips, hints, setup ideas, scripts, functions, and ways of improving the Vim experience. There are many topics covered, from heavy-duty Vim use for programming to cosmetic aspects of Vim set up. Whether you will get enough out of the book to warrant its $39.99 price tag (but see the Packt web page, there may be a discount) depends on your current level of Vim usage, but from my experience most Vim users will find something of use.

The use of the word "hacking" in the title of the book may be offputting for some people, but it is used here in a positive sense: that of investigating, understanding, and improving software in interesting ways. In this case, the Vim editor is the target and improving the user's editing experience is the goal. There is no modification of the actual Vim editor source code, but rather, its set up files as well as the creation of functions, and use of commmands in ways the user may not have envisioned.

The book assumes the reader has a generous familiarity with Vim. Hacking Vim is not a Vim instruction manual or tutorial on basic Vim usage. It will tell you how to use some of Vim's more involved or complicated features. It will not instruct you in basic movement and editing skills.

You must be adept enough with Vim to not be afraid to change its settings and to be able to use more advanced features of the editor. Intermediate and more advanced users of Vim should have no problem getting useful tips from this book. Beginners with Vim will still find useful information, and may grow into understanding other information the book provides, but make sure Vim is something you want to dedicate a significant amount of time to before buying a book like this, if you are a beginner.

It is written in a rather concise style, though the 'tell them what you'll tell them; tell them; tell them what you told them' format is a little pedantic. Part of the book is used to tell the history of Vim, vi, and other vi-like editors, which is marginally useful especially if you are a Vim user for a long time. You may learn something, though, if you have not used other vi-like editors.

Some of the tips in the book cover standard Vim commands, so in this respect the book overlaps with Vim's help system. However, the logical organization of the book into functions helps the user find and understand the material faster and easier. The Vim help system is often confusing, even for intermediate users. Note that this book does cover using and searching the Vim help system.

The book is mainly written for Vim version 7+. For previous versions of vim and gvim, icons are provided to indicate which are able to use the discussed recipe, tip, or map. This is a nice feature.

The sections of the book include:

Personalizing Vim: This chapter covers where to find the configuration files you need to change to ways of improving the look of vim such as color schemes, font selection, syntax highlighting, a better status line, customized menus, and tool-tips.

Navigation: covers command usage for better navigation, using key maps, using search, and using signs and marks.

Production Boosters: covers templates, tags, auto-completeion, macro recording, sessions, register usage, folding, diffing files, and remote file editing.

Advanced Formatting: includes aligning text, indenting, and using external programs to help with formatting.

Vim Scripting: includes setting up syntax coloring, color schemes, using scripts as well as developing your own scripts in detail (debugging, distributing them, and using external programming languages like Perl and Ruby).

Appendices include information on Vim games, using Vim for programming, e-mail in Vim, chatting in Vim, and ways of setting up your Vim configuration.

Personally, I wanted to read this book just to see if it would teach me something I didn't know. The book was successful in this regard. I learned several things from reading this book, and reminded myself of some things I had forgotten, so it was a worthwhile experience. Seeing how someone else uses Vim, as in this book, is also useful even though I may not always use Vim in the same fashion for my own editing tasks.

KN

Vim 5.x for MacOS
(http://www3.sympatico.ca/dany.stamant/vim/)

Requires System 7.0 and a 68020 or better (tested on a G3 with System 7.5 and MacOS 8.1).

Provisional Page for Mac Vim
(http://www-public.tu-bs.de:8080/~i0080108/macvim.html)

Has Vim 5.7 binaries tested on PPC (with MacOS 8.6) and on 68k (with MacOS 8.1).

Vim for MacOSX
(http://macvim.org/OSX/index.php)

Vim for MacOSX with Aqua (Carbon) interface.

Vim - Vi Improved (Claudio Fleiner)
(http://www.fleiner.com/vim/)

Information about Vim syntax highlighting (and quite a few vim syntax files), tips on creating your own Vim syntax highlighting file, using "dead" keys, and make with Vim.

Benji Fisher's Vim Page
(http://mywebpage.netscape.com/benjif/vim/)

Using Vim for editing TeX and LaTeX, including helpful macros. Other good stuff, too, such as Paul Kirkaas's scripts for HTML editing and Vim function examples. Get the matchit script here (lets you configure % to match regular expressions).

Preben 'Peppe' Guldberg's Vim Page
(http://www.xs4all.nl/~peppe/vim/)

Vim files and bits to answer questions from comp.editors, including how to enhance the <C-A>/<C-X> incrementing functions in vim.

Text Processing and Paragraph Formatting with Vim and Vi
(http://www.highley-recommended.com/text-processing.html)

Vim User's mail list archives
(http://groups.yahoo.com/group/vim)

Archive at Yahoo!Groups for the vim@vim.org mail list.

Vim Developer's mail list archives
(http://groups.yahoo.com/group/vimdev)

Archive at Yahoo!Groups for the vimdev@vim.org Vim developers mail list.

Steve Oualline's book Vi IMproved -- VIM
(http://www.newriders.com/)

Steve Oualline's book about VIM was published in 2001: Vi IMproved -- VIM by New Riders Publishing (can't seem to find it at New Rider's site any longer). If you are new to VIM or have been using VIM for a long time, you'll find something in this book to improve your editing efficiency or usage. I know I did. Order the Vim book via links (to Amazon) at this link and help ICCF help orphans: http://iccf-holland.org/click5.html

Here is the link to a PDF version of the book.

Steve Oualline's Vim Cookbook page
(http://www.oualline.com/vim-cook.html)

It contains "short recipes for doing many simple and not so simple things in Vim".

Vim webring hub
(http://U.webring.com/hub?ring=vim&id=21&hub)

The hub for the Vim web ring...has links to all the sites in the ring.

Vim Webring
(http://u.webring.com/hub?ring=vim)

A score of sites, related to Vim, in the Webring scheme of navigation.

Bram's unofficial Vim book errata page
(http://www.moolenaar.net/vim_errata.html)

A list of errors and annoyances in the first book about Vim.

Jano's Vim Macro Page
(http://www.vanhemert.co.uk/vim/)

Approximately two dozen macros for Vim in the categories of Toys & Entertainment (for example, a macro for creating text stereograms, and the Tower of Hanoi macro), Documents & Languages (including macros for C, HTML, and LaTex editing), and Miscellaneous (such as a file manager macro).

Gary Johnson's Vim Page
(http://www.spocom.com/users/gjohnson/vim/)

Provides the tidy.vim script, which uses the HTML Tidy program (http://www.w3.org/People/Raggett/tidy/) to report errors in HTML code.

Luc Hermitte's Vim Page
(http://hermitte.free.fr/vim/)

A collection of general purpose vim macros and filetype plugins.

[The screen shots above were grabbed while the application was running under XFree86 and the FVWM-95 window manager.


Back to Kent's Home Page

This page has been visited 8733+ times since December 26, 1997.