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?

Christian Fazzini
  • 19,613
  • 21
  • 110
  • 215

1 Answers1

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.

SirVer
  • 1,397
  • 1
  • 16
  • 15
  • I can't find any mentioning of inspansion in the [README](http://bazaar.launchpad.net/~sirver/ultisnips/github_mirror/view/head:/README.rst). 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. – Bentley4 Aug 08 '13 at 20:45
  • I do not understand what you mean by inspansion. Maybe the i or w options? See the docs for this: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt#L602 – SirVer Aug 09 '13 at 03:15
  • Wow, I provided the wrong link AND I somehow interpreted 'inword expansion' as 'inspansion' : s. I'm sorry! – Bentley4 Aug 09 '13 at 09:42
  • 1
    Looks like that launchpad link is hardly the place for UltiSnips questions, either. Go to their github instead: https://github.com/SirVer/ultisnips – labyrinth Jan 07 '16 at 17:16