The attached patch adds persistent undo functionallity to Vim 7.3
It is a feature of Vim 7.3 and thus it will not work on older versions. It allows you to save undo history after closing a file. I believe it can be very usefull at times.

ps: how can I commit it directly to git?

Comments

deviantintegral’s picture

Status: Active » Needs work

Is it possible to make the settings conditional on the vim version? Most Linux distros and OS X are on vim 7.2.

To commit to Git, you'd have to agree to the contributor guidelines in your profile. You'd also have to ask for permissions to commit to this project. Best way to get those permissions is to post patches showing your work.

http://drupal.org/contribute/development

bserem’s picture

Thnx for the info on git deviantinegral!

As for the conditional settings, I really can't answer, maybe someone else can!

skottler’s picture

+++ b/.vimrcundefined
@@ -24,6 +24,10 @@ set ruler                   "Show line and column number
 
+"Persistent Undo

Please add a trailing space after "

bserem’s picture

I'm afraid I don't understand

benjifisher’s picture

Status: Needs work » Needs review
StatusFileSize
new2.01 KB

If I understand skottler's comment #3, then all lines that start with a comment (not those that have code followed by a comment) should have a space after the comment character. The attached patch applies this style to the current git code and also solves the problem raised in #1 that persistent undo only works with vim 7.3 or later.

skottler’s picture

Status: Needs review » Closed (fixed)

Committed. Thanks very much for your patch!

bserem’s picture

An if statement inside the .vimrc! Brilliant!

ps: I got the problem on #3 now...