Snippet mode not existing upon reaching tabstop zero
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
UltiSnips |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When tabstop zero has been reached and a snippet is complete, snippets mode is not properly exited. This causes a problem when the tab key is mapped as both the expand and the jump key, as the next press of tab gets swallowed in order to exit snippet mode. This can be demonstrated as follows:
- In the .vimrc file, configure the forward jump trigger as follows:
let g:UltiSnipsJump
- Define a simple snippet such as:
snippet test "A simple test"
Expanded Text
endsnippet
- Expand the snippet with "test" and the tab key, then press tab again.
Instead of inserting a tab character (or chaining to SuperTab), the second tab key is swallowed in the process of exiting snippet mode.
A patch to exit snippet mode after tabstop zero has been reached may be found here:
https:/
In addition, the patch is attached to this ticket.
Note that the test defined in the patch will fail without the patch defined here, which is needed to keep UltiSnips from swallowing the second tab keypress:
https:/
This was reported in the following bug report:
https:/
Thanks,
Michael Henry
Excellent Patch. Thanks for contributing