Visual Studio Code Not Auto-Close Tags in HTML - html

So version before 1.30 worked fine, and did close the Tags in .html file, but as of 1.30 update I can't finish and then try to close it with
I have tried to delete config.json file, also tried to turno on every possible option for auto-close and auto-complete tags in options, but nothing worked.
And Sublime it's working fine. I downloaded plugin to transfer Sublime confing into Visual Studio Code but without success. Hope you can help me out, since i've been trying to fix this problem 3 hours now.

I had the same problem, then I noticed that my select language mode was something like Django HTML. Solved after changing it.

You might have opened a file before that changed the language mode. So first, check the language shown at the bottom-right of the VS Code window (status bar), then follow the steps bellow.
Go to settings (or edit the settins.json file) and search emmet.includeLanguages, then press add item under Emmet: Include Languages. input the language you are using in item field and html in value field.

Related

can't work with vscode python django html autocomplete features not working

first I created a project to work with django, but when I add index.html to it it doesn't autocomplete! When I type, nothing comes up, I also get an error like "This extension is deprecated because it is no longer maintained".
"!" in the html files of my codes.
When I put the tick I wanted autocomplete but it didn't happen and I searched a lot and couldn't find any result. I would be glad if you help.
Here is the following method for doing what you what to do.
open your vscode.
Go to setting and search emmet language in the search bar find it include the language and add a specific language.
After doing this save it and your vscode is ready to go.

How to align code, in PhpStorm / Intellij, using tabs (and not spaces)

I'm trying to setup PhpStorm, so I can simply press: "Reformat Code" ( Option CMD L), before each save - and then it'll make everything look right.
But I have this case, where I don't know how to make PhpStorm make the code right.
This is the code:
As you can see, then indentation is with tabs, but the aligning of the characters are with spaces.
I want it to look like this:
It would be cool to get the solution. But it would be even cooler to be able to figure out, how I could have found the solution myself.
Further info / idea: There is a Php Codesniffer from Squizlabs implemented. So I can fix is automatically by running a sniff fix-command. It would be pretty cool, to be able to automatically setup PhpStorm's Code style settings, to correspond with Squizlabs styles, without having to gradually tune the settings one thing at the time. But I haven't found that functionality.
Solution attempt 1: Read through all Settings >> Editor >> Code style >> PHP
I couldn't find anything that resembled this.
Solution attempt 2: Disable .editorconfig
I've read quite a bit about .editorconfig and it doesn't have these nitty-gritty functions here (as aligning equal signs).
But to make sure, I tried disabling it. Didn't make a difference.
Solution attempt 3: Search setting for 'align' and 'formatting'
But I didn't find anything useful. :-/
Solution attempt 4: Update PhpStorm
I was on PhpStorm version 2022.2.1.
I tried updating to PhpStorm version 2022.2.4.
This is still in progress.
Please show what you have at Settings (Preferences on macOS) | Editor | Code Style | PHP, specifically Tabs and Indents tab.
Checking Use tab character option with unchecked Smart tabs should do just that.
https://www.jetbrains.com/help/phpstorm/2022.3/settings-code-style-php.html#php-specific-formatting-settings-for-tabs-and-indents
(Pro tip: you can copy-paste your code sample in the preview area and start changing the options; the IDE will apply the changes live on the provided code sample instead of the default one.)

PhpStorm: Save as Live Template does nothing

Trying to create a Live Template in PhpStorm by highlighting a block of text, going to Tools > Save as Live Template.
When I do this, nothing happens. The Live Template dialog does not open and there is no other indication of an error. I can manually open the Live Template menu and add one there.
Is there a setting or configuration that is needed for this to be enabled?
PhpStorm 2017.1.4 on Windows 10
You can turn a highlighted block into a live template, but you need to make sure that there is no leading whitespace in your selected text, or it won't do anything, as explained in the original question.
This is likely a bug, see the issue in the comments to track resolution.

Eclipse and .tml files highlighting not working

I'm using eclipse Juno EE IDE for Web Developers.
When I open .tml files, they don't show the correct highlighting and auto complete isn't working. I thought this looked just like it's opening it in a text editor. I right clicked the .tml file and clicked open with > HTML editor and I still don't get the correct highlighting.
This works perfectly on my PC at home, I am at work and it doesn't work properly. Please can someone give me a quick heads up on what setting is wrong? I've spent ages looking and trying different editors, but i'm sure it should just work in the html editor.
Thanks,
Edit: When I hover over the underlined closing html tag, it says "The word is not spelt correctly". It's like it's a text editor, only I did right click > open with html editor.
(If not using Tapestry Tools, as uklance mentioned)
Remember that in addition to editing Eclipse's File Association configuration in:
Window->Preferences->General->Editors->File Associations
you should add the *.tml extension in the Content Types configuration in:
Window->Preferences->General->Content Types
there you should chose html or xml and click add to add *.tml
Have you seen the Tapestry Tools eclipse plugin?
Or you can just add a file association for *.tml to the XML or HTML editors.
Another alternative is using the JSP editor and a custom tld

Long delays when formatting a .cshtml file in Visual Studio 2012

Working with MVC4 using Visual Studio 2012 at the moment and when every I format a CSHTML document (CTRL + E + D) I get the "Waiting for a background operation to complete dialog"
This dialog stays around for roughly a minutes however I've had wait times of up to 10minutes before.
My document is not long it consists of 20< lines of basic html.
I'm only using 1 Add-in; Visual Git.
EDIT: Removing the Add-in has no effect.
EDIT2: I'm now getting the following error trying to edit the file after trying to format.
Attempted TextBuffer edit operation while another edit is in progress.
For me it seemed to be related with the razor syntax, since I only had it on one particular file.
For example if I put the following code in one line I had the described issue.
#section BodyClassName {note}
But when putting the closing parenthesis on the next line the issue went away
#section BodyClassName {note
}
Kind regards
Stijn
I had the same problem, i did the following and it worked for me.
UnCheck the ReadOnly attribute of your View(By using windows explorer)
If you already have your view open in VS, then close your view and open it again.
If you can click on Refresh button at the top of Solution Explorer, that will also reload the files.
It should be editable.
I hope that will help.
Thanks.