I have now got this working how I wanted. by adding
“word_separators”: “./\()”’-:,.;>~!@#$%^*|+=]{}`~?", (in my two syntax secific user files HTML.sublime-settings and PHP.sublime-settings, file omitting the & and the < chracters in both)
and
“auto_complete_triggers”: {“selector”: “text.html”, “characters”: “&<”} ], (in my Preferences.sublime-settings, with the & and < characters)
I now get autocompletions pop up for e.g.
, as well as &, which is what i wanted.
But I am a bit puzzled by “scope” and “selector”. At first I had “scope”: “text.html”, in my HTML.sublime-completions file and “selector”: “text.html”, in the “auto_complete_triggers”:, but I hadn’t added the “word_separators”: to my PHP syntax file and so the autocompletions only worked for HTML files. But in fiddling around I realised I wasn’t sure how to add PHP to the scope or selector entries, so I just deleted them completely. Once I had added the “word_separators”: to my PHP syntax file everything worked as I wanted, without the scope or selector entries, but I suppose that would mean that the same autocompletions would pop up in every file that I edited, so I added back the “scope”: “text.html”, and “selector”: “text.html”, and the autocompletions still work for PHP files as well as HTML, so do I actually need to mention PHP in the scope and selector or are PHP files recognised as a type of HTML file? I have read the suggested entry on scope in the documentation but it left me rather baffled.
PS: and now of course I realise that fiddling about with the “<” character has stopped all the other built-in functions like
working!
Kind regards - David