0

So I recently made the jump over to VIM and I'm still testing out all sorts of plugins. Now, I installed snipMate and the snippets work really great, but I'm encountering a strange bug.

When doing undo / redo the buffer ends up in pretty strange states.

Before the undo (just some random test coding):

conn.on('foo', function(bla, bar, test, foo) {
    conn.foo.hasOwnProperty('test');
    if (true) {

    }
});

After the undo:

conn.on('foo', function(arguments) {
    conn.foo.hasOwnProperty(  
    if
});

As you can see it's completely broken, so the question is, is there any magic I can sprinkle onto the plugin to prevent it from destroying my history? I don't have problem with hacking around in snipMate itself.

I already removed all plugins except for snipMate to make sure there are no conflicts.

I'm using VIM 7.2, here is my .vimrc (yes needs some cleanup...)

Ivo Wetzel
  • 46,459
  • 16
  • 98
  • 112
  • it is not so obvious to me what is "completely broken" ... do you refer to "i triggered 'if' and now it does not remove the 'if' as well"? – akira Feb 09 '11 at 08:42
  • Well it did not remove `if` but it removed part of the line above nameley `'test');`. Simply put: `u` removes things more or less "randomly" when a snippet was used. – Ivo Wetzel Feb 09 '11 at 15:45
  • so provide the state 'before snipmate', 'after snipmate' and then 'after undo'; the latter 2 you gave already. – akira Feb 10 '11 at 09:47

1 Answers1

0

I think have read this issue somewhere else before. You should try to use the fork version of garbas on github. I don't have the issue with this one. The initial version of msanders is no longer maintained.

Plouff
  • 3,290
  • 2
  • 27
  • 45