New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong cursor position with one-line snippets #203
Comments
@feuerbach I can't reproduce this. Could you make sure you're up to date on SnipMate? Are you using the version 0 parser or the version 1 parser? Could you also share your vimrc, a list of other plugins you're using, and the output of |
I am running the most recent master of snipmate. I was able to reproduce this with a pristine vim setup that has only snipmate and its dependencies installed.
However, systemwide vim plugins may be active. These appear to be:
I tried disabling them by changing So, I start vim, and in the empty buffer type If I then execute
I get
|
What is your Vim |
|
Hmm I'm still unable to reproduce using Vim 7.4.640 and no configuration other than loading SnipMate. Do you get the undefined variable error when expanding a snippet with multiple tab stops? That variable doesn't exist for very long with snippets containing only the zero tab stop. |
No, with a multitab snippet I get
(This is after expanding the BTW, with that snippet, here's what I got: You can see how the cursor stayed at the beginning of the line and, because of that, the selection is wrong (but spans the right number of characters). |
While the new version is a lot simpler, the old version should still work. It doesn't in some places for some reason. See issue #203.
With access to a Fedora machine, I was able to reproduce this and track down the problem. For whatever reason, the version of Vim that Fedora ships has problems with a regex used in the legacy parser. Tweaking it a bit, it should work everywhere now. Worth mentioning, the version 1 parser had no problems on Fedora. Thank you for the report! |
Thank you! This was driving me crazy. |
One-line snippets such as
no longer work on Fedora 22 (vim-enhanced-7.4.640-4.fc22.x86_64).
Namely, after expansion, the cursor stays on the initial comment, not at the end or at
${1}
.Multiline snippets seem to work fine.
The text was updated successfully, but these errors were encountered: