Sublime Forum

JavaScript completions

#21

This will be my last update, you might be pleased to hear :smiley: , because Iā€™ve got this GitHub thing working (link provided in previous post).

I have used abbreviations in the tab triggers by removing the bracketed text shown:
Canvas 2(d)
CanvasGrad(ient)
Func(tion)
Hist(ory)
Navig(ator)

The purpose of this is to reduce the number of mis-hits when typing, without losing the ability to track down these specific objects. It also reduces the file size very slightly.

Iā€™ve kept the full words Document, Window, Location, etc., because these terms are so familiar, and abbreviating them doesnā€™t assist searching. However, Iā€™ve removed the text ā€˜Dateā€™ from the triggers. This is because itā€™s much easier to type day, month, time, etc., or get, set, to, UTC. Iā€™ve kept them for the static functions parse() and UTC() though.

Iā€™m not intending to play with this any more (unless someone points out omissions or mistakes), as I want to play with Python! Regards, Andy.

0 Likes

#22

Many THX Andy!
any clues how to add syntax colors to the functions ?

0 Likes

#23

[quote=ā€œelkraneoā€]Many THX Andy!
any clues how to add syntax colors to the functions ?[/quote]

This would require modifying the ā€˜JavaScript.tmLanguageā€™ file and your chosen theme-file. Itā€™s not straight-forward unfortunately :blush:. Alternatively, you might find an existing theme that includes specific JS syntax colours. If you find such a theme, you could modify its ā€˜tmThemeā€™ file to change some of the colour-numbers. I donā€™t know which themes include JS colours :question:

Andy.

0 Likes

#24

any thread about this on userecho?
itā€™s quite painfull using this forum since there are no mail notificationsā€¦

Would you mind continuing the discussion here:
http://sublimetext.userecho.com/topic/94863-poor-or-non-existant-javascript-autocompletion/

0 Likes

#25

[quote=ā€œagibsonswā€]

[quote=ā€œelkraneoā€]Many THX Andy!
any clues how to add syntax colors to the functions ?[/quote]

This would require modifying the ā€˜JavaScript.tmLanguageā€™ file and your chosen theme-file. Itā€™s not straight-forward unfortunately :blush:. Alternatively, you might find an existing theme that includes specific JS syntax colours. If you find such a theme, you could modify its ā€˜tmThemeā€™ file to change some of the colour-numbers. I donā€™t know which themes include JS colours :question:

Andy.[/quote]

THX Andy, great work

0 Likes