Open stackem opened 10 years ago
Hi @stackem, your issue actually applies to all jQuery.
methods (jQuery.ajax()
, jQuery.map()
etc) so I would have to change it for all of them. Do you think that is a good idea?
yeah I think that would be a good change
Hi I'm trying to solve this problem here https://github.com/gaboesquivel/jQuery/tree/new-triggers
I've reorganized the snippets in the following directories: ├── Completion_Snippets -----> these will not include $. or jQuery. ├── Dollar_Snippets -----> these ones will include $. ├── Plugin_Snippets ----> snippets for building plugins ├── jQuery_Snippets -----> these will include jQuery.
for dollar snippets I'm using j_
prefix and for jQuery snippets J_
. Sublime snippet triggers are caseSensitive.
for completion snippets I'm not sure if we need to use .triggerString
( includes the dot ) or simply the function name as trigger.
For all them ideally we will get the list of options while typing and we need to properly describe that this is jQuery autocomplete in description.
let me know your ideas.
also what are Support and Syntaxes for?
Old issue, but one that has been bothering me only more recently.
I've implemented a "fix/hack" that's working for me.
My main issue was the snippet for $('')
producing a double-$.
I edited the tabTrigger
to be a double-$ and it works to produce a single $ instead. Sublime has even learned that when I use a single $ + tab it triggers this snippet accurately.
Edited snippet:
<snippet>
<content><![CDATA[\$('${1:string/element/array/function/jQuery object/string, context}')$0]]></content>
<tabTrigger>$$</tabTrigger>
<description>$('#select DOM Element')</description>
<scope>source.js</scope>
</snippet>
When I type
jQuery.ajax or $.ajax
and then select the first normal ajax function, the following appears:
$.$.ajax({ ... or jQuery.$.ajax({ ...
It helps to have a good function build but you always have to remove the leading doubled indicator. It maybe is the case with other functions too, but am using the ajax request quite often so it's quite annoying.
Best, Robin