Postfix snippets are an incredibly useful feature in IntelliJ IDE's.
Only recently I came to realize this [could be implemented with UltiSnippets](https://github.com/sniphpets/sniphpets-postfix-codes/blob/master/UltiSnips/php.snippets).
I think it would be a nice addition to the UltiSnippets documentation, in the hopes it could help others spend less time than I did trying to figure out how to put it together.
Grants access to:
* context match condition for context snippets (via snip.visual_text and
snip.visual_mode);
* pre/post actions (via same variable);
* context match condition to (!) lastly selected placeholder, so it is
possible now to use autotrigger snippets, that are activated by
simply typing letter while tabstop is selected;
* python interpolations to lastly selected placeholder;
It adds new type of flexibility, where just entered text can be
dynamically modified if some conditions are satisfied (e.g. dynamically
add line wraps).
I encountered an issue with Deoplete where Ultisnips suggestiosn wouldn't appear if there was a match in the current buffer with the same name as a Ultisnip snippet. This change allows the snippet and buffer match to appear side-by-side, which is less confusing.
More information can be found on the issue on the Deoplete repo here:
https://github.com/Shougo/deoplete.nvim/issues/138#issuecomment-174050309
Consider the snippet
snippet test
${1:${VISUAL}}
endsnippet
A missing 'extend' keyword caused the inner closing bracket to end both
the inner 'snipVisual' and the outer 'snipTabStop' regions. Anything
after the inner bracket was considered 'snipSnippetBody' and thus
highlighted incorrectly.
UltiSnips tracks changes in buffer and apply user changes only on
CursorMoved event. So, if placeholder is replaced completely by using
<BS>, CursorMoved is not triggered and internal snippet representation
is not updated, causing placeholder boundaries go out-of-sync.
Fixed by triggering text objects sync forcefully if change without
cursor move is detected.