I have:
* Created a new section "4.1.3 How snippets are loaded"
* Moved documentation from "4.1 Adding Snippets" section into "4.1.3 How snippets are loaded"
Instead, trigger an auto command whenever a .snippets file is saved that will reload the snippets. This is a performance improvement with a loss of functionality: externally (i.e. outside of the current Vim instance) generated snippet files will not be picked up until UltiSnips#RefreshSnippets is called.
I decided to not expose a command for this, since I assume it is rarely useful. I think the command would add confusion of when it was supposed to be ran.
Fixes#932.
The variable g:UltiSnipsSnippetDirectories including its documentation was introduced in b47e686. There the documentation read
> let g:UltiSnipsSnippetDirectories=[$HOME.'/.vim/UltiSnips']
This example was later changed in #775, claiming that this variable needs to be a string. This seems to have been done in error, so this change reverts that PR back to the original documentation.
Fixes#815.
Emphasizing 'not' as '*not*' causes :helptags to generate a tag called
'not'. Because people like writing '*not*' in their documentations, this
can cause duplicate ta conflicts with other plugins (e.g. Command-T's
doc also generates a 'not' tag).
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 can be useful to set up mappings that apply only during expansion of
a snippet. UltiSnips does this internally with the `_setup_inner_state`
and `_teardown_inner_state` methods.
This commit adds some `User` autocommands so that users of UltiSnips can
set up their own mappings and tear them down at the same time as
`_setup_inner_state` and `_teardown_inner_state`.
This is particularly useful for people who are writing their own
expansion and jump functions using `UltiSnips#JumpForwards` and
`UltiSnips#ExpandSnippet()` and friends. Here's an example from my own
dotfiles:
- 0664b627e7
- 3740c248ee
Using this approach I've been able to get rid of Supertab and have a
more nuanced autocompletion experience that works exactly as I'd like
with YouCompleteMe.