After exiting yasnippet
snippets that contain one or more tab stops, I often find myself wanting to go back and modify content that I entered at the tab stops. Of course, I can do this using standard movement and editing commands, but it would be much easier if I could simply reactivate, say, the last snippet I inserted and TAB through the fields again.
Another frequent use case is exiting snippets prematurely. I sometimes do this on purpose, but more often than not this happens because I accidentally hit C-g (or some other command that cancels the snippet).
Q: Is there a way to resume or reactivate a snippet after exiting it?
I ran M-x apropos
for various combinations of yas
/yasnippet
and resume
/reactivate
, but that didn't turn up anything useful.
UPDATE
As @Stefan helpfully points out in the comments, it is possible to call undo
to reactivate a snippet. However, this is only useful as long as the current buffer stays unmodified: If I exit a snippet, make some unrelated modifications in other parts of the buffer, and then hit C-/ (undo
), Emacs first reverts the most recent changes instead of resuming the snippet, which (in most cases) is not what I want.
undo
? – Stefan Nov 09 '14 at 23:12undo
is the best you're gonna get. – Malabarba Nov 10 '14 at 09:51