At the time this question was posted in 2016, this was a bug in UltiSnips. This issue was also reported on github here, and it has since been fixed in 2017.
(There was a separate, but related issue: neovim would freeze when a function key is pressed. In that issue, the solution was to update pynvim.)
I got it to work:
x = vim.current.window.buffer
y = vim.current.window.cursor
z = vim.current.window.cursor
return x[y-1][z-1] + x[y-1][z] != char
snippet ( &...
You have to use the i option. This is in the help page:
i In-word expansion - By default a snippet is expanded only if the tab
trigger is the first word on the line or is preceded by one or more
whitespace characters. A snippet with this option is expanded
regardless of the preceding character. In other words, the snippet can