User: Password:
Subscribe / Log in / New account


Vim 7.3 Released

August 25, 2010

This article was contributed by Joe 'Zonker' Brockmeier.

Vim development doesn't move quickly, but the popular vi-replacement text editor continues to evolve. Maintainer Bram Moolenaar released Vim 7.3 on August 15th with support for new language interfaces and the ability to retain undo information between sessions.

The 7.3 release comes about two years after 7.2, and is primarily a maintenance and bugfix release, but does include a few notable new features and a few changes. Support for GTK+ 1.x has been removed in Vim 7.3 in favor of GTK+ 2.x, which shouldn't pose a problem for any users on modern Linux distributions. For the full list of minor changes from 7.2 in Vim 7.3, users can run :help version-7.3.

The most interesting feature in Vim 7.3, at least for most, is the addition of persistent undo. Prior to 7.3, the "undo" history for a file was lost when exiting Vim or unloading a buffer. Vim 7.3 adds the undofile option, which allows you to save the undo history and restore it when reopening a file. Since it's possible that a file would be changed in another editor or by another process, Vim saves a hash of the file and compares it when re-opening the file. If the file being edited has changed, the undo history from the previous session is disregarded to avoid problems.

The Vim 7.x series has added a number of features that make it easier to undo changes and revert to prior versions of a file. The 7.0 release introduced the :earlier and :later operations, which can move through the file's history by time rather than stepping through and undoing operations one by one. For example, it's possible to revert to a buffer's state as it was an hour or day ago using :earlier 1h or :earlier 1d. Using :later 1h or :later 1d would restore the buffer.

Vim 7.3 builds on this by adding a file write option, in addition to the time-based options. Using :earlier 1f moves backwards one file write, :earlier 2f back by two writes, etc. Using :later 1f and so on will restore the buffer to later file writes (if any).

Python 3 and Lua support is now available in Vim 7.3, so users can use Python 3 or Lua within Vim to create macros. This is similar to the way that Emacs uses Lisp, but users can choose to compile in support for Python, Lua, Perl, Ruby, and others. Vim has supported Python 2 for some time, but Vim 7.3 adds the Python 3 interface as an option. Vim can have both Python 2 and 3 compiled in, but only one version can be active at a time.

Vim has supported encryption for files for some time. Files can be encrypted using the :X command, and then require a password to decrypt the file on opening. (Note that the swap file is not encrypted during the editing session.) Earlier versions of Vim used a weak encryption based on PkZip, but 7.3 adds Blowfish for strong encryption. The weak encryption is used by default, but this can be overridden using the cryptmethod option. To set the option during a Vim session, you'd run set cryptmethod=blowfish.

New to Vim 7

For users who haven't looked at Vim in a while, the Vim 7 series brings quite a few new features to Vim and helps Vim stand out as far more than just a simple vi clone.

[GVim screen shot]

Many users prefer Vim for programming, but those who turn to a text editor for prose will be happy to know that Vim 7 sports a spell checker. Using the spell checking feature, Vim will not only highlight words that are misspelled, but also can suggest words and replace the misspelled item.

It seems that all programs eventually trend towards a tabbed interface, and Vim is no exception. With the 7.0 release, Vim introduced a tabbing feature that allows users to open each buffer in its own tab (if they so choose). This is available in the standard text-mode version of Vim as well as GUI Vim (GVim). Vim also supports a command called :tabdo to allow users to execute commands throughout all buffers that are open in tabs, not just the current buffer.

Vim 7 also introduced an internal version of grep. Previous versions of Vim could use external grep to search files on disk, but this was a problem for Windows versions of Vim and also posed a problem because different systems come with different grep implementations. In Vim 7, users can work with :vimgrep to search through files for a pattern, and then the :copen command to see the files that match the pattern (if any) and edit them.

It's also worth mentioning that Vim's license is unique. Moolenaar distributes Vim under a "charityware" license that allows using and copying Vim as much as one likes, but encourages donations to needy children in Uganda via ICCF Holland. The full text of the license is available in Vim's documentation.

The recommended method for getting Vim sources is via the Mercurial repository, but source tarballs are also available via FTP. Vim 7.3 compiles without any problems on Ubuntu 10.04 after installing the needed dependencies.

Overall, Vim 7 was a major leap over Vim 6, with a lot of miscellaneous new features and improvements. If you're a heavy Vim user, the 7.3 release is worth the time to download and compile just for the persistent undo feature. It's also interesting if you use Python 3 or Lua, otherwise it's fairly light on new features. If for some reason you're still on a version of Vim prior to 7.0, now would be a good time to update.

Comments (3 posted)

Brief items

Quote of the week

So long as handset makers are "lazy" about implementing Android and don't take advantage of the freedom they have to alter the Android source code much, life for developers can be good. But differences will creep in as the Android world ages: version skews, different bug fixes, and the handset makers attraction to "added value" and "product differentiation" will all take their toll without strict governance.
-- James Gosling

Comments (none posted)

Cython 0.13

Cython is a compiled language which looks very much like Python, but which allows performance-enhancing tricks like static typing and easy linkage to C functions. Version 0.13 is out; significant new features include full closure support, C++ support, improved type inference, and more.

Full Story (comments: none)

Gnash 0.8.8 Released

Version 0.8.8 of the Gnash Flash player has been released. The big news is that YouTube playback works (again), but there are a number of other improvements as well; see the announcement for details.

Full Story (comments: 13)

OpenSSH 5.6 released

The OpenSSH 5.6 release is available. There are a lot of new features, many of which have to do with improved key management, support for host certificates, and protection against phishing attacks.

Full Story (comments: 8)

Python 2.6.6 released

The Python 2.6.6 release is out, with fixes for "a truly impressive number of bugs." Note also that it's the end of the line: "Python 2.6.6 marks the end of regular maintenance releases for the Python 2.6 series. From now until October 2013, only security related, source-only releases of Python 2.6 will be made available. After that date, Python 2.6 will no longer be supported, even for security bugs."

Full Story (comments: none)

RabbitMQ 2.0.0

Version 2.0.0 of the RabbitMQ messaging system has been released. New features include a new "persister" which can page messages to disk, AMQP 0-9-1 support, better statistics, and more; see the release notes for details.

Comments (none posted)

A systemd status update

Lennart Poettering has posted an extensive update on the fast-moving world of systemd. "We reimplemented almost all boot-up and shutdown scripts of the standard Fedora install in much smaller, simpler and faster C utilities, or in systemd itself. Most of this will not be enabled in F14 however, even though it is shipped with systemd upstream. With this enabled the entire Linux system gains a completely new feeling as the number of shells we spawn approaches zero, and the PID of the first user terminal is way < 500 now, and the early boot-up is fully parallelized. We looked at the boot scripts of Fedora, OpenSUSE and Debian and distilled from this a list of functionality that makes up the early boot process and reimplemented this in C, if possible following the behaviour of one of the existing implementations from these three distributions. This turned out to be much less effort than anticipated, and we are actually quite excited about this. Look forward to the fruits of this work in F15, when we might be able to present you a shell-less boot at least for standard desktop/laptop systems."

Comments (55 posted)

Newsletters and articles

Development newsletters from the last week

Comments (none posted)

All Systems Are Go (InformIT)

InformIT interviews Rob Pike about the Go programming language. "Go isn't proprietary-it's completely an open source project. All of the development of Go is done in the open, in a public source-code repository and using public mailing lists. Like any other source of good ideas, users have influence (subject to the goals of the language). Go was only launched a few months ago, yet we have over a hundred contributors to the project-and that number continues to grow. For instance, the FreeBSD and Windows ports of Go were done entirely by contributors outside Google."

Comments (68 posted)

KDE 4.5 Trades Revolution for Evolution (Datamation)

Over at Datamation, Bruce Byfield tries out KDE 4.5 and finds it to contain a lot of small improvements that add up to an overall easier-to-use experience. "The KDE 4 series could still use some polish here and there. However, for the most part, KDE 4.5 marks the end of the development cycle that began two and a half years ago with the release of KDE 4. Most of the issues people initially raised about the KDE 4 series -- instability, a lack of configuration options, the slow speed -- have now been addressed, and at best only minor tinkering seems needed."

Comments (20 posted)

Page editor: Jonathan Corbet
Next page: Announcements>>

Copyright © 2010, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds