About those widows...
Hi all,
I have a recurring problem when editing CSS files. Sorry, a trivial one.
Whenever I try to write "width" I get "widows" instead. I type "wid" and automatically push enter as soon as I see the suggestion popup. I guess this is because all sane developer tools autocomplete "wid" to "width" (both Chrome and Firefox).
But since "widows" is alphabetically before "width", then I get the former.
Is there any way to have autocompletion ordered by frequency and not alphabetically?
Alternatively, is there any way to blacklist some CSS properties to appear? I never used the widows property in my whole life, and I can live without it, I guess...
Same goes for "mar" which does not autocomplete to "margin" but to "max-resolution" (which completely baffles me).
Thanks
Please sign in to leave a comment.
Hi there,
>Is there any way to have autocompletion ordered by frequency and not alphabetically?
It should pick it up eventually .. but it's not the case here as it's a different kind of entry (see below)
>Alternatively, is there any way to blacklist some CSS properties to appear?
Sadly you cannot backlist unwanted CSS properties.
-----
In general: just use "w" and then hit your completion key (a Tab/Enter). It's an Emmet abbreviation for "width:" (implemented in IDE via Live Template).
The reason for "wid -- is the same / related to the above: "wid" is an official abbreviation for "widows" .. and Live Templates will appear on top (as it's an exact match). Same for "mar".
Solution -- since it's a Live Template ... just disable unwanted entry at "Settings (Preferences on macOS) | Editor | Live Templates | Editor | Live Templates | Zen CSS"
Hi,
I was not aware of the way the abbreviations work. The whole concept of Live Templates is a bit confusing to me. One problem is that those settings sit under "Zen CSS" (why not just CSS, since this is applied to any CSS/SCSS file and is on by default?). Also, there is an Emmet section, but it does not make any reference to Live Templates.
Thanks for your reply, I will take a deeper look into those abbreviations and into Emmet itself.
>The whole concept of Live Templates is a bit confusing to me.
It's just a code snippets... with some dynamic stuff (you can apply certain functions to variables/placeholders).
>One problem is that those settings sit under "Zen CSS" (why not just CSS, since this is applied to any CSS/SCSS file and is on by default?). Also, there is an Emmet section, but it does not make any reference to Live Templates.
Zen Coding is a previous (initial) name for Emmet. Hence "Zen CSS" and "Zen HTML" groups: to keep CSS and HTML content separately.
Live Templates is a long existed functionality for code snippets. Standard CSS/HTML abbreviations from Emmet are perfectly handled by this existing functionality, no need to invent anything new, users know about it (what Live templates are), abbreviations can be disabled/edited if needed etc.