You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
I started thinking that perhaps it was those created with a previous yasnippets was at fault, so I recreated two expansions using M-x +snippets/new.
The first file, test, allows me to undo through its creation. test
# -*- mode: snippet -*-
# name: test
# uuid: test
# key: tes
# condition: t
# --
<test>
$0
</test>
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. definition2
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!
jmhammond
added a commit
to jmhammond/doomd
that referenced
this issue
Dec 9, 2019
... 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: