Closed engelsanchez closed 7 years ago
@engelsanchez I have two questions: Which patchlevel of Vim 7.3 are you using (the Included patches
line in Vim's version output)? And does this happen with both versions of the snippet parser (see g:snipMate.snippet_version
in :h SnipMate-options
)? I suspect that this is related to #203 and #206. Both involved problems with a regex used in the legacy parser. If that is the problem here and the newer version 1 snippet parser does work, I'm inclined to ask that you simply use the version 1 parser. Version 0 is legacy after all, and I don't want to be spending a lot of time trying to fix problems with it. Clearly I can't properly test this specific issue to find a proper solution anyway.
@ajzafar: I had seen the parser version changes you made recently, and I had already tried both: it didn't work with either version unfortunately. I saw that you had worked recently on something related and had also tried reverting to c86c64508, but not the previous change before the fix to multiline. I should try that.
Vim version output is:
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Sep 28 2012 05:42:23)
Included patches: 1-29
@engelsanchez If this is happening with both versions, then this may not be related to the other issues at all, possibly even unrelated to the parsers. I'm unable to reproduce this with Vim 7.3.29 on my machine though, with both master and c86c645 and both snippet parser versions, so I'm going to need more information. Preferably let's try testing this only with version 1 of the parser. Once we find out what's going wrong, we can take a look at version 0 if it needs separate fixing.
<C-R>=exists('b:snip_state')
(where <C-R>
is CTRL-R
). Is a 0 or a 1 inserted?:echo string(b:snip_state.stops)
? That last one may not work right if the snippet has a lot of nesting.Closing due to inactivity.
Hello there. I tried installing and using vim-snipmate today for the first time. It works fantastically on my Mac where I have vim 7.4 installed. On my Linux dev box I have less control over things and our company has 7.3 installed. Single line templates work as far as I can tell (default values, mirrors, tabbing back and forth), but multiline templates fail immediately. After the template text is inserted, the cursor ends up after the first tab stop and has left insert mode. I verified this using a C file and the tde (typedef) template from vim-snippets, a two line template:
I'd be happy to debug this further if you give me a way to print debug information in the script. I'm a vimscript n00b.
My .vimrc is very basic on this machine:
And I have the following pathogen managed plugins: