The following is an interview with Bram Moolenar (creator of vim) that I conducted back in 1999. I’ve been a fan of vim since I started using Linux and still am. After the interview, I was able to talk my employer at the time into flying Bram into NY for Linuxworld 2000 as our guest. Good times. 1. First off, we all know what vim is, but what is your definition? The manual page says “vim – Vi IMproved, a programmers text editor”. The first part obviously means that it is an improved version of Vi. You can edit text while keeping your fingers on the keyboard. No need for a mouse or Meta-Shift-X key combinations. Once you have learned the commands, you can do your work very fast. Vim is mostly made for programmers. This does not mean that you can only edit programs. It sets the user group at which Vim is aimed. Programmers are a special kind of people in the way they use a computer. Vim was made to help them. A good example is the “:make” command, which runs “make”, parses error messages and allows you to jump directly to where the error was detected. One flaw in this definition is that Vim has become more than an editor. One of the recent additions is the internal script language. This is in fact an extension to the “:” commands. It can be used for any task. For example, you can transform text into HTML, including the syntax highlighting. Very useful to include pieces of program code on your web pages or in documentation. Vim recognizes the syntax of over 100 files, and you can add your own.
2. Why did you first start vim? I learned to use Vi during my studies and later at work. When I got myself an Amiga 2000 for home use, I searched for a Vi-alike that would run on the Amiga. Stevie was the program I found. But it had bugs and missed quite a lot of the commands that I would like to use. I started with fixing the bugs, and adding the Vi commands that my fingers were trained to use. I called it “Vi IMitation” back then. I started adding useful new commands after that. That is where it became “IMproved”. I continued making changes, and, well, I never stopped doing that.
3. Has a lot changed since version 1.14 (The version that first appeared on “Fred Fish disk 591?)? Certainly. The first publishing of the soure code triggered quite a few reactions. By then Vim was only running on the Amiga. Someone sent me patches to run Vim under MS-DOS. Others sent me bug reports (that has never stopped too! I received lots of ideas for new features. All this has lead to a gradual development. Now there are mailing lists for Vim, and there are more ports to different systems. Vim even got its own Internet domain “vim.org”. Vim got organized! www.vim.org
4. How close to ‘vi’ is vim? About 99% of Vi is in Vim. The main features that are lacking are open mode, sending an e-mail after a crash and a few options for working with slow terminals. Hardly anybody complains about these, or even knows that they are missing. Nevertheless, this is still being improved. One of the recent additions is encryption.
5. What are some features that vim has, that vi does not? Vim has an awful lot that Vi doesn’t have. Two that I really miss when using the good old Vi are file name completion and multi-level undo. When writing programs the syntax highlighting helps a lot to quickly understand the code and to spot obvious errors. The ability to record a sequence of commands is very powerful for more complicated changes that need to be repeated. The command line history allows recalling and editing previously used commands. Well, I could go on for a while! What also should be mentioned is that Vim runs on a lot of different systems. Vi only runs on Unix. That’s why Vim has been called the ubiquitous editor. People that (are forced to) switch to MS-Windows often see Vim as a life-saver.
6. What is in store for vim users in future releases? The next version will be 5.4. It will probably be released in a few months. One of the new things in version 5.4 will be the GTK+ GUI. When selecting a rectangular block, it is now possible to insert text in front of it, replace it with a fixed character and shift it left/right. There are quite a few other small improvements. For Vim there is a todo list of about 1000 entries. It’s hard to select the next thing to work on. In a recent survey, folding was the number one desired item. It is going to be a big change, but I’ll start working on it soon. This is supposed to become Vim 6.0. Many of these new things are made by others. I’m now spending more time on integrating all patches and making sure the overall quality is maintained. The result is that there is more diversity in the new features. Previously I mostly added things that I needed myself. It’s great to have a group of people working together to improve Vim.
7. I understand that vim is concidered ‘charityware’. What is this? It is FreeWare with a twist. I don’t really need to get money for Vim, but some people liked Vim so much they wanted to give a reward somehow. I thought it would be a good idea to give it to charity. That was how “CharityWare” was invented. I’m not sure if I am the first to think of this, but I would certainly like to encourage other FreeWare authors to do the same.
In 1993 I first visited an orphanage in Uganda. What I experienced there really touched my hearth. I wanted to help these poor children. Therefore I started asking people that, if they like Vim, they would donate money to the project. In 1996 I started the ICCF Holland foundation, to give a firm ground for the help to the project. See www.vim.org/iccf for more info on the project and ICCF.
Thus, Vim is still FreeWare. You can use it without paying anything, but I do encourage users to donate to the project in Uganda. It works quite well. In 1998 I have been able to send about $12,000 to the project. It is mostly used to allow the children go to school and for medical care.
8. Mind showing us your .vimrc, with some explanation for some of it’s lines? Well, my own .vimrc is a mess. You don’t want to see it! I use it to try out new features, reproduce bugs that have been reported, and there are even a few things for my own preference. You are much better off having a look of what other people have done with their vimrc. You can find quite a few on the Vim pages. See www.vim.org/users.html.
Here is a small part of my ~/.vimrc file, with a few comments:
I like to keep some context around the text my cursor is in.
set history=50 set bs=2 tw=78 ai is bk set viminfo='50,"50,%
This is essential: Remember a lot of things when exiting/restarting Vim.
set ttimeout notimeout timeoutlen=100
I tend to use “[I" a lot: Find the definition of the word under the cursor. Very useful when the header files contain function prototypes.
After patching, my directories are clobbered with *.orig and *.rej files. Put them at then end of the list for file name completion.
" remove all autocommands
autocmd BufRead,BufNewFile * set fo=tcql nocin com&
autocmd BufNewFile *.[ch] 0r ~mool/.cfile
autocmd BufRead,BufNewFile *.[ch] set fo=croql cin com=sr:/*,bm:*,el:*/,://
autocmd BufRead,BufNewFile *.[ch] let &path=&path.”,proto”
Edit C files with a few different options. Especially 'cindent'. Not only does this avoid the need to align the text, it also traps a forgotten semicolon or brace. autocmd BufWritePre,FileWritePre *vim/vim/runtime/doc/*.txt if getline(1) =~ "Last modification: "
autocmd BufWritePre,FileWritePre *vim/vim/runtime/doc/*.txt normal msgg/Last modification:
This is a nice one: Hitting gives me a different fortune every time. I have collected a list of fortunes and put them in my ~/.fortunes file.
This is where I'll stop, it gets messy from here on.
9. Would you like to add anything? I would have stopped working on Vim long ago if I didn't get so much user response. Working on a program for free can only be done when there is enough stimulation to spend time on it. It is the user feedback that keeps me going. Not only the remarks about how great Vim is, but also the questions for new features. Especially if I can use them myself too!
So, if you use a free program and find it useful, don't forget to send a message to the author(s). I'm sure that it will stimulate them to make more!