-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Can't undo snippets #13
Comments
I started thinking that perhaps it was those created with a previous yasnippets was at fault, so I recreated two expansions using The first file, test, allows me to undo through its creation.
This second file, definition2, a recreation of the definition expansion used in the video above, still doesn't let me undo using the standard undo command.
There must be something about the more complex expansion that is the problem. |
... one final piece of the puzzle. If I enable, in my init.el file However, if I have multiple tab-points:
I'm able to undo, but only after I tab through every possible location. Without the +tng flag, undo doesn't work, as in the original gif. As a workaround, I've enabled +tng and I've changed all of my snippets to have only one $0 rather than multiple $n targets. I'm leaving this open, since there's something to this, but you're welcome to close it if it's not a bug in doom-snippets. Sorry for the comment spam, and thanks for your time! |
... per my comments at doomemacs/snippets#13, having only one target, $0, rather than $1, $0, I'm able to undo snippet expansion. That's more important than tabbing through to me.
This is actually related to the discussion of #6. When I expand a snippet using doom emacs (via TAB), it presents the snippet perfectly, but I can't undo the expansion of the snippet as #6 reported using the basic undo function.
I tried prettying ESC and C-g many times followed by many instances of undo, but the problem is that the snippet has created an undo branch point. In order to reverse it, we need to
M-x undo-tree-visualize
and then cursor through until we figure out where we intended to go.I'm new to doom emacs as of yesterday - I've been using spacemacs with the same yasnippets ofr year (I literally copied over my
snippets
folder into my .doom.d), and in spacemacs I didn't I have problem using undoing.I spent far too many hours on this trying to diagnose the problem (avoiding grading finals...). Do you any advice about what to try?
The text was updated successfully, but these errors were encountered: