Actions

Vim

From RonWareWiki

VIM - the programmer's editor

VIM is an extremely powerful programmer's editor based on the vi editor from Unix. It takes a bit of getting used-to, but once one has a working knowledge of it, skill and speed come quickly.

VIM is an "improved vi", which has essentially all the features a programmer could want in a relatively small and fast package. Ron's install (link below) has all sorts of useful enhancements. It is packaged in an NSIS installer package, just click the exe file to install. Updates to his package are made from time to time; it's worthwhile checking back every so often.

Why use VIM?

  1. Why should I use VIM, when Notepad is right there on every Windows machine?
  2. I like MultiEdit/VisualStudio/Eclipse/...!
  3. Isn't VIM just for dinosaurs who don't like CRT screens?
  4. But it doesn't have a nice GUI!

As for #1 - if we only ever had to use Windows machines, that would almost be a reasonable statement. Since we need to also work on Linux machines occasionally, and since vim is always installed on every Linux machine (it's the default editor), learning how to use VIM is a good idea even if you prefer to use another editor (as in objection #2).

Concerning #3 and #4 - suffice it to say that VIM is not VI. It is "improved" in the same manner that a Mercedes S-class is an "improved" Model-T. Among the standard features in VIM:

  • exhaustive and excellent online help (accessible via F1 or the ":help" command)
  • GUI (both native Windows, and GTK on Linux); color schemes
  • syntax highlighting for over 400 languages
  • multi-lingual support (UTF-8, custom keyboard input, custom spelling dictionaries)
  • character, line and block selections; mouse selection
  • ctags and cscope support
  • comprehensive scripting language
  • extensive regular expression support

There are tons of other features which I won't enumerate. Now if the objection was "I like EMACS", I would say - fine, use EMACS. They are functionally equivalent in terms of power, though VIM is smaller and faster (and easier to use IMO, but that's opinion).

How do I learn VIM?

The editor already contains its own tutorials; but there are excellent resources online, many of which are not specific to VIM:

You can find more by asking Google for vim tutorials.

NOTE: vim starts a text-mode console version of VIM, whereas gvim starts a GUI version of VIM. On Windows they are different programs while on Linux they are just symlinks to the same executable. I always use gvim on Windows, because console support is ... not good ... on Windows since Microsoft thinks it unimportant.

How do I get VIM?

You can get it from the vim website. But if you use Windows, you might prefer to get Ron's build which is linked below. Linux users of Ron's build should get 'wmctrl', 'exuberant ctags' and 'idutils'

Once you become a hard-core vimmer, you'll want to drink your coffee from a VIM mug.

Links