jskinner / DefaultPackages

Old bug tracker for Sublime Text's "Default Packages", e.g. bad syntax highlighting
http://web.archive.org/web/20150524043750/https://www.sublimetext.com/forum/viewtopic.php?f=2&t=12095
26 stars 2 forks source link

autocomplete box doesn't suggest previously used attributes (HTML Syntax) #118

Closed FichteFoll closed 4 years ago

FichteFoll commented 9 years ago

From @bzx on April 15, 2015 11:21

Whenever I use attributes like "data-*" or "placeholder" in HTML documents, they don't get remembered so when I want to use them again in the same document, the suggestion box doesn't display them. It used to work fine in ST2, now in ST3 it's just not there.

I am not sure if there's a special setting for autocomplete, but I couldn't find it... so if I'm missing some special setting, please let me know what it is.

ST2 screenshot st2

ST3 screenshot st3

Copied from original issue: SublimeTextIssues/Core#799

FichteFoll commented 9 years ago

They are actively exlcuded from the completions via Packages/HTML/html_completions.py, which provides the context-aware HTML completions in the first place.

You can fix this locally by installing PackageResourceViewer, running the "Open Resource" command, browsing HTML/html_completions.py and then replacing line 137 with

return (completion_list, sublime.INHIBIT_EXPLICIT_COMPLETIONS)

(that is, no sublime.INHIBIT_WORD_COMPLETIONS).

Downside: If this file receives updates in any future build you will not receive them since you are overriding the file.

bzx commented 9 years ago

Thank you!

FichteFoll commented 9 years ago

Update: for the same reason that words in the buffer are not displayed, completions or snippets are not either.

FichteFoll commented 4 years ago

Closing this in order to clean up this repository. If you encounter this and the issue still exists in the latest ST build, please open a new issue at https://github.com/sublimehq/Packages.