UltiSnips not triggering correctly
Asked Answered
V

1

5

I'm using UltiSnips.

http://www.vim.org/scripts/script.php?script_id=2715

Everything works. Let's say when I type st<tab> it inserts submit_tag…. But if st<tab> is in between other characters, it won't work.

For example: foost<tab>bar

Anyway to fix this?

Vieva answered 24/10, 2011 at 21:49 Comment(0)
S
22

I am the author of Ultisnips. You might get faster feedback on our bug tracker for things like this: github.com/SirVer/ultisnips.

The feature you are looking for is called inword expansion. Use it like this:

snippet st "My cool st snippet" w
stollen
endsnippet

The 'w' will make sure your snippet is also expanded inside of other words.

Salon answered 29/12, 2011 at 19:39 Comment(4)
I can't find any mentioning of inspansion in the README. The README (part 4.1) says that that is the default behavior without providing an option. Anyway, thanks for responding to this person's question. I'm very grateful for Ultisnips, I use it every day. Thanks for all the work you have put into it.Dime
I do not understand what you mean by inspansion. Maybe the i or w options? See the docs for this: github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt#L602Salon
Wow, I provided the wrong link AND I somehow interpreted 'inword expansion' as 'inspansion' : s. I'm sorry!Dime
Looks like that launchpad link is hardly the place for UltiSnips questions, either. Go to their github instead: github.com/SirVer/ultisnipsLoment

© 2022 - 2024 — McMap. All rights reserved.