Vim 7.3 released
groups.google.com
groups.google.com
It's also pretty cool how he asks for donations to be sent to nonprofits instead of himself.
I know this is irrelevant to the new release, but I think it's great that he still keeps it going after 20 years without any monetary gain (at least directly from the project).
What's more, it's awesome that new releases still bring new functionality to the table.
Bram is the one and only developer of Vim.
To turn on persistent undo, I created a new directory called ~/.undo to store all of the undo history so that my working directories wouldn't get cluttered. Then in .vimrc, I add:
set undofile
set undodir=~/.undoQuote from :h relativenumber
Show the line number relative to the line with the cursor in front of each line. Relative line numbers help you use the |count| you can precede some vertical motion commands (e.g. j k + -) with, without having to calculate it yourself. Especially useful in combination with other commands (e.g. y d c < > gq gw =).
More specifically, http://github.com/downloads/b4winckler/macvim/MacVim-7_3-53....
It's solid.
I like the incremental improvements to things in this release. Kudos to Bram (and Bjorn for the Mac build).
The online docs are still 7.2, so I had to dig into the source for a link to the new persistent undo/redo docs (search for "undo-persistence"):
http://code.google.com/p/vim/source/browse/runtime/doc/undo....
But I did come to the conclusion that Emacs' default undo system is where it's at. Every modification should be undoable, including undos. Once you understand how it works, there's no longer a need for trees and the complexity that brings.
EDIT: It seems that undo-tree.el file has a good explaination in the comments: http://www.dr-qubit.org/undo-tree/undo-tree.el
It's quite simple if you think of every operation as a function that modifies the document. As you do something, a function that reverses those changes is pushed onto an undo stack. This incudes when you hit the "undo" button.
So if my document state looks like this:
start->A->B->C
where an arrow is a state change, my Undo stack will look like:
U0<-U1<-U2
Where function U2 will get me from C to B, U1 from B to A, and U0 from A to the original document.
If I hit undo, that's a modification, so the state history looks like:
start->A->B->C->B
And my undo stack gets the "un-undo" pushed on the top, and looks like:
U0<-U1<-U2<-U3
So U3, when executed, brings me from the second state B back to state C. I'll never lose anything because every state I've ever seen in the document is implicitly stored in the undo stack.
If you're wondering how pushing an un-undo function on top of the undo stack doesn't prevent you from going beyond one level of undo, it's a simple trick; there is an undo stack pointer that decrements every time you hit "undo" and resets on any non-undo action. This is why in emacs you used to have to "do something else" like type a character to break the undo chain and re-visit more recent states.
I saw you have experience with Haskell, have you seen Yi? http://yi-editor.blogspot.com/ It has an Emacs and Vim frontend, but is far from being finished.
I'm working on integrating it with Google docs so that you can work on your documents using a vi/emacs-like editor, which is extensible just like emacs except using javascript rather than elisp.
I hadn't seen yi, but it looks very similar to what I want to do, which is combine the best of vi and emacs into a new editor. I'm particularly interested in decent web-based editors, however; the implementation language is secondary.
EDIT: Ah, the binary distribution is compiled with -lua (see :version). Cloning the Hg repository now...
Vimtutor is great, but for a general outlook for someone learning vim this post is spot on: http://yehudakatz.com/2010/07/29/everyone-who-tried-to-convi...
I keep hearing people talking about Vim and how it will change your life, mannn. Is there a good beginners guide?
You can also get a vi plugin for Visual Studio http://www.viemu.com/ which is pretty cool.
Maybe it's just that viemu for VS2010 has only just come out recently, and may still need some tweaking. Long term, it's probably a great tool.