Home Download Buy Blog Forum Support

Auto-complete issues when snippet starts with $

Re: Auto-complete issues when snippet starts with $

Postby agibsonsw on Sat Sep 22, 2012 12:58 pm

As an example:

Code: Select all
// Additional situations to trigger auto complete
    "auto_complete_triggers": [ {"selector": "source.coffee,source.js,source.js.embedded.html", "characters": "$"} ],

would allow $ to trigger completions in coffeescript files, etc. I don't believe the dollar-sign needs escaping in this setting.

But you might need to read the docs to learn when characters require escaping (or double-escaping) in completions and snippets. ST2 is quite clever though as it (for me) dis-colours the back-slashes if I have the wrong number of them. [Edited: Actually, it only does this for me in completions files.]
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: Auto-complete issues when snippet starts with $

Postby grumpyOldRussian on Sun Sep 23, 2012 1:12 am

I think I tried almost everything... doesn't work
grumpyOldRussian
 
Posts: 6
Joined: Thu Sep 20, 2012 12:21 pm

Re: Auto-complete issues when snippet starts with $

Postby Iristyle on Mon Sep 24, 2012 3:06 pm

Thanks for the tips... this *mostly* works.

The completions file has been updated with \\$ ... and I've added the bit to my user prefs.

However, when executing a completion, I end up with, for instance $$resource instead of just $resource.


Any ideas here?
Iristyle
 
Posts: 3
Joined: Fri Sep 21, 2012 2:26 pm

Previous

Return to General Discussion

Who is online

Users browsing this forum: Google [Bot], mcchabby and 28 guests