When expanding a yasnippet snippet and filling out completion fields yanking/pasting inserts text correctly among fields as expected, but interrupts the snippet expansion behavior (as if pressing C-g
/ calling yas-abort-snippet
).
How can I yank content and continue with yasnippet expansion?
Edit: This appears to be a problem with yasnippet itself and the order of placeholder fields. According to the documentation I believe each of these forms are correct and should work.
Since this is exceptional behavior and not universally broken yanking:
Are these forms valid / Is this in fact a bug?
This works:
# -*- mode: snippet; require-final-newline: nil -*-
# name: work
# key: work_
# binding: direct-keybinding
# --
This works: ${1:someDefault}
$1
This doesn't:
# -*- mode: snippet; require-final-newline: nil -*-
# name: nowork
# key: nowork_
# binding: direct-keybinding
# --
This does not work: $1
${1:someDefault}
(emacs 24.5.1; yasnippet version 20160104.129)