Gabe's Vim Pages
Vim SGI binaries
You can get
vim compiled for SGI's IRIX.
Special feature: it has been configured with XIM
(so that you can type in Japanese characters [and probably other Asian
languages]), and cscope.
Autocorrect conversion
Here is a little
program
which turns word's autocorrect lists
into a "iab" file which can be sourced from within vim.
Then, if you make a typo which is in that list, it will be corrected
automagically.
This is an example of such an
autcorrect "iab" file;
it is WindowsXP's English ACL file, converted to vim.
I use for writing LaTeX documents.
"vimrc" files
Should you care, here are my "vimrc" files.
Just untar the
tar-file (1.7 MB) in your home, and viola!
They contain features and settings for C++ programming, LaTeX, mutt,
spell checking,
and lots of other neat stuff.
They should work fine under Unix/Linux + [t]csh and Windows without any
tweaking.
On other platforms, you might have to adjust them a little to your
paths/shell/OS (look for the tilde and zach).
You might also which to take a look at my
X resources.
Conversion between LaTeX and HTML
Here are a few vi (well, vim :-)
html2tex macros
to help converting html into LaTeX source.
They do some simple replacements, such as
<TT>...</TT>
will be replaced by \texttt{...}
,
"..."
will be replaced by ``...''
, and so on.
Just load the html source into vim,
then :source
the macros.
And for the other way, here's
tex2html macros.
I must confess that they are not as complete as the html2tex macros!
Links
Here is my little collection of vi/vim links:
Tutorials and references
-
Copy tutor.txt to your current working
directory, then type vim tutor.txt, then follow the instructions.
(An older version of this file is probably in you vim installation under
/usr/local/vim/tutor/tutor)
This will take about 30 minutes and teaches you about 80% of the
commands you'll need during daily programming life.
-
A very short introduction (5 minutes) is at
VIM Virtuosity.
It tells you the 7 most basic commands, which will enable
you to edit a file.
-
Two books for Vi and clones (Vim is one) are
Learning the VI Editor
(review)
and vi Editor Pocket Reference
(review).
-
A very concise reference guide is the
VIM 5.6 Reference Guide.
Emacs vs Vim
Here is my point of view in the religious war of "Emacs vs
Vi[m]".
First, I should begin by making clear that there are
situations/preferences for which vim is not the editor of choice:
-
Don't focus so much on counting key strokes,
because then you quickly get into discussing whether to count
$ as one keystroke or two.
-
If you really want a tool that is "all-in-one", i.e.,
which has an editor, a mail reader, a news reader, a browser, etc.,
then emcas is your choice.
("Emacs wouldn't be such a bad operating system, if only it had a
decent editor" -- ok ok, this was a little bit polemic,
it's just one of those jokes about emacs which seemed in order ;-)
-
If you need an editor for writing letters and other "prose",
then Word or something similar is probably best.
If the above are not your premier criteria, then vim is your choice:
- vim is upward compatible to vi.
So if you master vim you can edit with vi.
vi is on every unix box, even on the most "naked" ones.
In addition, vi runs on practically any terminal and any connection,
even when logged in from half around the world through several
"hops". (I'm typing this on an old Ampex terminal (vt 100
like) via a 9600 Baud connection.)
- vim works like you think.
Many commands are "mnemonic".
In a recent post, Randy has put it quite nicely:
As I said earlier, vi works like I think. I think "replace this
word with that one;" "delete this line;" "yank
this paragraph and put it down there;" "move there and insert
a word;" "format this paragraph." Vi provides commands
that map to how I think. Some of the time I'm just typing in text
without editing it, but normally I'm editing text. I tend to write
something, then go back and make it perfect. I prefer to copy
something that is already there and then modify it to be what I need.
This expresses very well what I believe has been a major design goal of
vi!
-
Now for the modal/modeless controversy.
If you really think about it, it boils down to the following: it's a
matter of how you define "modal"/"modeless"; in
other words: if vim is modal, so is emacs - if emacs is modeless, so
is vim.
The reason: in emcas you are by default in "insert" mode;
you have to type "ctrl-m ..." to issue
an editor command; so "ctrl-m" is actually a switch to
command mode).
In vim, you are by default in command mode; when in insert mode,
you type <esc> and then some command, and then i
to get into insert mode again.
While programming, you are at least half of the time
in command mode (if you are an Emacs user you might not be aware of
that because nobody calls it like like that).
The difference between Vim and Emacs is that most most Vim commands
are mnemonic and need much less modifier keys, such as Ctrl, Alt, etc.
-
I believe that modal editors are more efficient for
programming (and similar tasks, like writing latex).
This is because I find myself much more often editing text
which is already there, rather than producing new text
which hasn't been there before.
This goes well with the observation, which someone reported in
the comp.editors news group about joint strain.
I almost get joint strain myself when I see emacs users holding down
the ctrl or alt key all the time with their pinky or thumb ;-) ...
-
I'm not sure what the reason is,
but I've never seen emacs users who actually used all those
feature which emacs-the-editor offers.
(At the office, I'm surrounded by emacs and nedit users ;-)
I mean features like marks, tags, jumping up/down paragraph-wise,
jumping to the beginning/end of a function, searching identifiers in
all include files, etc....
I suspect, this is because it's simply just too difficult to
remember all those ctrl-alt chords. :)
[no offense intended!]
- Speed:
CPU-wise, vim is still by far more efficient than emacs.
I can tell, because my office-mate uses emacs :)
Try running emacs on an SGI Indy! Or on a PC/486!
- Links related to this discussion:
http://www.linuxcare.com/products/prodmore.epl?PRODUCT_GROUP=Text+Editors
,
http://www.csn.net/~bediger/perfect.editor.html
So, IMHO there are a lot of reasons why vim is better than emacs,
but that depends on your preferences.
Should you experience any problem with downloading,
or should you have any suggestions or comments,
then please let me know
by email to zach in.tu-clausthal.de.
Gabriel Zachmann
Last modified:
Sat May 12 17:13:15 MDT 2007