Sublime Forum

My own snippets does not show up in the auto-complete pop-up

#1

Hello,

I started doing my own Snippets library recently and when I download other users snippets they show up in the auto-completion thing that pops-up with info about the snippet. However, I can’t get any own my snippets to show up in the auto-complete window. The only way I can use them is by pressing tab.

Is there anyway for me to add something to my snippets so they can show up in the window with the description?

Because I’m doing my own snippets library for Unity 3D, and I would like the pop-up window to show me all suggestions, when I start typing OnTrigger, it should show me OnTriggerEnter, OnTriggerStay, OnTriggerExit as suggestions, but for some reason it doesn’t. :frowning:

// Tobias

0 Likes

#2

It’s hard to tell what you problem is when you don’t share an example of your non-working snippets

0 Likes

#3

Sorry, forgot to add that…

<snippet>
    <content><![CDATA[private void OnTriggerEnter (Collider other) { $1 }]></content>
    <!-- Optional: Tab trigger to activate the snippet -->
    <tabTrigger>OnTriggerEnter</tabTrigger>
    <!-- Optional: Scope the tab trigger will be active in -->
    <scope>source.cs</scope>
    <!-- Optional: Description to show in the menu -->
    <description>Enter a trigger</description>
</snippet>
0 Likes

#4

probably because you didn’t end the CDATA correctly:

should be

{ $1 }]]></content>

this’d be easy to spot if you used https://packagecontrol.io/packages/PackageDev

0 Likes

#5

Sorry, that was copy paste error. It has two of them, when I look.

The auto-complete works when I write OnTriggerEnter and press tab, but it doesn’t give me a pop-up window suggesting it.

0 Likes

#6

works for me, maybe some third party package interfering or not typing the capitalization correctly? i.e. OnT instead of ont

0 Likes

#7

Hmm, okay, I need to look into that. Maybe some other package is breaking it for me. Because that is weird. Especially since other suggestions work, just not my own.

0 Likes

#8

Okay, I looked into this some more. They do show up, when I create a new document but not in my already created Unity scripts. Has anyone else encountered this?

0 Likes

#9

Yeah, I think I’m having the exact same issue. Are Brazilian btw? Tobias is a Brazilian name

0 Likes