Vim 7.3 is out!!

Couple of days ago, Vim team released new version of their great text editor. Once I had a little time, that’s today, I upgraded all my boxes. There couple of new features that are particularly interesting:

a) Persistent undo

Small but nevertheless very useful addition. Basically, your undo lists are dumped into undo files allowing you to undo/redo even if buffer is unloaded (or even if editor closed). Plus now you are able to undo even after buffer reload (this is separate feature actually).

To enable, add to your .vimrc:

set undofile
set undodir=/tmp

That will enable dumping undo lists into undofile, which will be located in /tmp folder.

b) Arbitrary columns

Main use for me is to highlight maximum line length. You could have similar functionality before, but now it is supported out of box:

" make sure that max lines are displayed
" (80 and 120 are from ZF Coding standards)
set colorcolumn=80,120

To update the color of the ruler use hl-ColorColumn. In our custom theme (based on wombat), I set color as:

hi ColorColumn guibg=#2d2d2d

c) Relative line numbers

Well, at first I though this kind of controversial feature, but once I tried to navigate inside document using it – I suppose I like this feature. In any case, not added to my .vimrc by default. I turn it manually:

:set rnu

and to get back to original line numbers:

:set nu

d) Conceal text

Well, this feature is mainly for syntax file writers, as it might make markup text more readable. I, honestly, haven’t enough incentive to dig into it any deeper, as I don’t really see how can I use it in my immediate work (I actually like to see all the markup).

Conclusion

Although 7.3 is a minor release, it is still the result of two-years of work, with a lot of issues fixed and several very cool additions.

Couple of notes on installation

On our 4C’s development server (running CentOS), I was able to compile 7.3 without any issues whatsoever.

While recently switching to Mac, I still program on my old Ubuntu box and updating the Vim installation didn’t work the first time I tried. I noticed that my Ubuntu installation needed xorg-dev and libgtk2.0-dev packages, once installed I was able to compile an complete the Vim’s installation.

Here is little script I use to compile and install Vim on CentOS (used it on Ubuntu as well):

#!/bin/bash
export CONF_OPT_GUI='--enable-gui=gtk2'
export CONF_OPT_PYTHON='--enable-pythoninterp'
export CONF_OPT_MULTIBYTE='--enable-multibyte'
export CONF_OPT_FEAT='--with-features=huge'
export CONF_OPT_COMPBY='--with-compiledby="yourname@here.com'

make distclean
./configure $CONF_OPT_FEAT $CONF_OPT_MULTIBYTE $CONF_OPT_PYTHON $CONF_OPT_COMPBY $CONF_OPT_GUI
make
make install

Save it into extracted vim73 directory (I prefer to use name “configure-my”), then simply source:

source configure-my

Hope that saves you some time and happy Viming!!

    ,
    Trackback

    no comment untill now

    Add your comment now