Sublime Forum

Completion Files, symbols in triggers?

#1

Hi guys, I’m noticing some weird behavior in my completion file:

[code]{ "trigger": "@Foo", "contents": "FooBar" }, { "trigger": "#Bar", "contents": "BarFoo" },[/code]
If I type @Foo, it gets replaced with @FooBar.
If I type Foo, it gets replaces with FooBar.
So it seems like the ‘@’ is completely being ignored as a trigger and the completion is done after it.

But then if I type #Bar or Bar, I get BarFoo. It deletes/overwrites the ‘#’.

So then I tried this:

{ "trigger": "@Foo", "contents": "@FooBar" }, { "trigger": "#Bar", "contents": "#BarFoo" },

Now, when I type #Bar or Bar, it gets replaced with #BarFoo
If I type Foo, I get @FooBar.
If I type @Foo, I get @@FooBar

My solution is to do this:

{ "trigger": "@Foo", "contents": "FooBar" }, { "trigger": "#Bar", "contents": "#BarFoo" },

But I’d like to know why there’s a difference between the way these symbols seem to be handled. Ideally, I’d like the @ completion to behave the same as the # completion. Either @Foo or Foo should complete to @FooBar.

Thanks!

0 Likes