Atom IDE won't give code assist for css classes with dash - autocomplete

I know that there are posts related to this issue, for instance, github has a post here: https://github.com/atom/autocomplete-plus/issues/922 claiming the issue to be fixed. I can't seem to figure out the fix even after combing through everything...
The issue is that, if I have a css class in my stylesheet with a dash in the name, example:
.my-style {
background: green;
}
code assist in Atom will not pick it up in the html editor. For instance, if I go to type the following:
<div class="my-"
I get absolutely no help in code assist with this.
autocomplete-css and autocomplete-plus packages are both enabled.
I get code assist for regular words, just not with dashes.
Very annoying as I've become accustomed to this feature!
Apparently this issue has been resolved, however I don't understand how to fix it. I figured a more clear answer on this would be helpful for others as well.
Thanks!

Alright, I figured it out. Hopefully this may help others who are slow like me.
First, go to your autocomplete-css package settings.
Second, scroll down to the 'Extra word characters' setting. In the form entry for this setting, simply type the dash character (-).
Works like a charm. You could add an _ (underscore) as this is commonly used for class naming conventions. I feel much better now :)

Related

Phantom line display in Visual Studio Code IDE

In VS Code I have a tab with a plain text file I use for scratch while working during the day. I place all kinds code, questions, TODO lists, etc in this file and will reference it from time to time. It's helpful for history purposes.
At any rate, this file has ballooned up to well over 46,000 lines over the years and I'm now seeing this odd phantom line being injected at my cursor. I am unable to select it or remove it. I thought it was being displayed as VS Codes way of letting me know that a software update was available but when checking that was not the case. This is what it phantom line looks like, it seems to contain a history of CSS classes used over the years which is odd.
If I restart VS Code it goes away for a little while but then reappears. I have a feeling it might be because of the number of lines or perhaps memory but can't say for certain.
Has anyone else seen this behavior? I've probably enabled some setting by mistake and have no idea how to disable it.
Any suggestions would be greatly appreciated. Thank you!
Turns out it was the HTML End Tag Labels plugin that was trying to auto complete some HTML that was somewhere within the 46k lines.
I would have thought by identifying the file as type Plain Text, the plug-in would ignore trying to close HTML tags (since its not an HTML file) but alas that's not the case.
Thank you Mark Ahrens for the tip!

Is it my imagination or did footnote style links stop working in vscode preview mode?

I always use footnote style links in markdown because it makes the plain text more readable for me. E.g.:
This is [Stack Overflow][1].
[1]: https://stackoverflow.com
in most Markdown renderers will display as:
This is Stack Overflow.
I could have sworn I've been doing this all along in vscode. However, recently I notice that it in vscode renders as:
This is [Stack Overflow][1].
It knows there's something special about the footnote style link because it doesn't render the footnote at all. But the anchor text is not rendered as a link. This seems like a severe regression to me, but I can't find any bugs reported for it.
My specific questions that I am seeking definitive answers on:
Can anyone confirm that this either did or did not work in the past?
Has this been intentionally disabled?
Is this part of the new workspace security settings?
Thanks to those who commented that it works for them. Knowing that it works for other people really helped narrow down my search for what was wrong.
Turns out the Foam extension was causing this. After disabling it footnote links render properly now.

How can I prevent html tags from being red underlined inside of .ejs files?

If I start an .ejs file with a tag like h1, it is underlined in red, like VSCode expects me to add the whole typical html boilerplate. However, I have seen many videos where the host doesn't get this underlining.
I have tried extensions, I have modified the settings.json with "*.ejs": "html", but nothing works.
Do you know how I can get rid of it without having to add DOCTYPE, , etc.?
So after figuring out that this problem caused by a lint or other validator (in this case W3C Validator) installed as an extension in Visual Studio Code, you can disable its warnings by going to extensions and disable the validator.
However, those tools are here for a reason :) and they help us write better code that fits to known standards and syntax issues, so disabling them is less recommended. (Although it can become bit annoying while using external third-party libs which can be can some warnings by that validator too - for that, some lints offers ignoring logic which let you ignore some of the files or lines in the code).
Good Luck, Happy coding!

Automatically formatting HTML within PHP with VSCode?

I tried Intelephense and dozens of other extensions and settings but NONE of them achieved what I'm after. What I prioritize is automatic tag close and automatic indent... most of others VSC functionalities for HTML would be great too, like css classes or files paths suggestions, but what I really need is this 'basic' automatic format...
I'm sorry for this question, I know it's been done and answered before, it's just that I can't get my VSC to correctly work with HTML when mixed with PHP, and I've been trying for months now... Read everything I've found on Google, searched about it here and on Reddit, but wasn't able to reproduce any of the solutions, or better saying, none of them worked for me.
Could anyone give me some guidance?
Luckily I felt the same way as you so I just decided to go ahead and hammer out a solution to this very annoying problem with a VScode extension that doesn't register itself as a "formatting" extension I format the HTML onBeforeSave so you can still register a PHP formatting extension so between the two it gets the whole file. I use js-beautify so you can just use all the native HTML formatting settings in VSCode already.
Format HTML in PHP on the VSCode Extension Marketplace.

Auto closing tags in gedit -- can a man dream?

Top of the morning to y'all.
I recently switched to Debian and I'm finding gedit 3 to be a worthy replacement for notepad++.
I have one complaint though: I can't find a plugin which will close tags for me.
Example:
When I type the following
<p>
As soon as I type the ending >, I want </p> to be inserted.
<p>_</p>
The cursor should remain between the two tags, where I placed the _ character.
Anything that'll do this for me?
PS: Please resist the urge of telling me to man up and just use vim/emacs :(
maybe try Geany?
Please look at the Geany snippets video.
The gedit plugin "intelligent text completion" inserts the appropriate closing tag at the insertion of "</" just like Macromedia Dreamweaver. This functionality comes close to what you describe.
(Video)
It might be beyond your dreams, but there is Zen coding out there giving you an intelligent autocomleting syntax.
There are two ports for gedit from fmarcia and mikecrittenden.