VS CODE UserSnippet does not work on SHIFT + 1 in html file [duplicate] - html

Every other snippet is working, but !+tab is not.
! snippet is not working
other snippet is working
I am using Visual Studio Code. I'm using 1.69.0. It was working before, but I wanted to add net html file, named that new.html, because I had index.html already. After that this script stopped working on every html file, but other scripts like "a", "div" etc. is working.

The v1.69.2 recovery release is out now. Emmet in html is working as it should for me now.
Looks like it will be in the Recovery Release, see https://github.com/issues?q=is%3Aissue+label%3Acandidate+repo%3Amicrosoft%2Fvscode+repo%3Amicrosoft%2Fvscode-internalbacklog+repo%3Amicrosoft%2Fvscode-remote-release+milestone%3A%22June+2022+Recovery+2%22+.
Don't know when the recovery release to Stable - presumably v1.69.2 - will be released. The .1 release is out and the fix is not in it.
It has been fixed though, see https://github.com/microsoft/vscode/issues/154375, and should be in the Insiders Build tomorrow (07/13/2022).
Testing the latest Insiders: ! is working. As is ul>li*3 type expansions (although that never stopped working for me - but it has been reported elsewhere). Should be in the v1.69.2 release out soon.
It is a known issue with the v1.69 release, see html emmet suggestion not automatically display or https://github.com/microsoft/vscode/issues/154517 for example. Lots of issues on github on ! and * not working.
So the emmet snippet will not appear automatically when you type !, but you can press Ctrl/Cmd+Space (which is the command Trigger Suggest) to make it appear and select normally.
Try Ctrl/Cmd+Space for anything emmet-related nnnnnot working in vscode v1.69.
You could also go back to v1.68 to solve the issue.

Try to write "doc" instead of "!". "doc" works for me.

On Windows 10, this worked for me:
Go to "Settings" and type "emmet.trigger" in the search
A checkbox for "Emmet: Trigger Expansion On Tab" will appear
Check the checkbox for allowing Emmet to trigger expansion on tab
After I did that, it worked just fine for !+TAB and any type of mulitpliers (i.e. li*4+TAB).

You need to check this option or put "emmet.triggerExpansionOnTab": true in settings.json to use the emmet abbreviation pressing TAB. I realized this ones what is not working:
!, lorem, >, and .
Examples of use: ul>li, li3, ul>li*3
None of them shows the preview of the emmet, and you can't use them pressing TAB without enabling the option that I sayed above, and even checking the option you won't be able to see the previews, you'll need to know them by yourself and press the TAB even though nothing showing that it's a emmet abbreviation.
You can use CTRL + SPACE too.
Edition Windows 11 Pro
Version 21H2
VSCODE Version 1.69.0

I had the same issue with the ! not working. I found another shortcut that does the same thing: type html:5, and press enter.

Looks like a bug, I have the same problem with 1.69.1, the VSC team is aware and fixing it. Should be fixed with the next release soon.
Meanwhile, you can use either HTML:5 or doc
meanwhile use "HTML:5"
enter image description here
or use "doc"
enter image description here

While #Mark's answer works, another work around would be to use the html:5 snippet which still works as expected in v1.69

Yes, I am facing this issue too since the latest update.
Somehow the solution I have got is :
You can check the box “Emmet: Use Inline Completions”
In settings by typing “emmet” in the setting’s search.
You can see the suggestion now and choose it by pressing the tab.
This is the solution I have got till now but hoping that we could have the previous version back.

Related

Disable code completion for a shortcut in PhpStorm

I stumbled across this, when I tried solving this: Searching for Live Template in PhpStorm, from abbreviation (wrong expansion?).
TL;DR
In PhpStorm, in a markdown-file, when I write 3 back-ticks and press enter, it expands to this:
```angular2html
```
And I would like PhpStorm to stop helping me here, and just type what I typed:
```
```
Detailed description and solution attempts
In a Markdown-file (readme.md), I use it often to write a code block with three ticks:
```
But when I do so, PhpStorm suggest a bunch of stuff:
So if I press Enter here, then it expands to:
```angular2html
```
So how do I change this behaviour?
Solution attempt 1: Deactivate the bundled Angular-plugin
There is a (bundled) plugin called: 'Angular and AngularJS'. If I deactivate that, then it looks like this:
and expands to this:
```apacheconf
```
Solution attempt 2: Ensure Markdown is supported
I'm really baffled why this happens. Does PhpStorm not realize that I'm in an .md-file?
And/or is this the usual desired behaviour, when people write three backticks in a and .md-file?
I can confirm that I have an active (bundled) plugin called: 'Markdown' (version 222.3739.61).
Solution attempt 3: Add a new Live Template
This actually works, by making a new Live Template, to be this:
```
$END$
Remember the blank line underneath. This is since I would like to press Enter, and that replaces the first 3 ticks with this, but not the ones PhpStorm automatically adds dues to auto-closing of brackets and backticks.
This solution attempt seems quite hacky, though. :-/
From https://youtrack.jetbrains.com/issue/IDEA-266239
The pop up was created to make specification of code fence language easier and to enable automatic code injection. We can’t disable it since it would affect a lot of users using it for fast code injection.
angular2html is the first entry in your case. Somebody else may have another language ID (e.g. aidl).
Right now it cannot be disabled or customized. So you will have to either use your own workaround (with Live Template) or press Esc before hitting Enter.
Other than that: watch that IDEA-266239 ticket (star/vote/comment) to get notified with any progress. No better suggestions right now.

problem in using emmet in visual studio code

I am experiencing a strange problem with emmet in vs code.
after typing some emmet abbreviation and pressing tab I get a warning saying "command emmet.expandAbbriviation not found"
I have double-checked my settings.json and "emmet.triggerExpansionOnTab": true is there in the file.
I have been using vs code for a month but never before I had any problem with emmet, but suddenly this problem has come up
Update: I have noticed that suddenly other extensions like live server have also stopped working and also I'm no longer getting autocomplete suggestions from MDN docs.
Judging from this emmet won't work issue, the problem might have begun as a result of the last update.
Search #builtin in the Extensions view and make sure the Emmet extension is enabled.
Open the VS Code. Go to the Vscode settings by pressing the setting icon or ctrl+.
In the setting tabs, click on the HTML option.
Click on the “Edit in settings:json” hyperlink to edit the settings in JSON format. Click on the Edit in settings.json to edit and fix emmet problems.
Inside the curly braces, enter the following code under the already written JSON code:
“emmet.triggerExpansionOnTab”: true,
“files.associations”: {“*html”: “html”}
5.Save the file. Now if you try to apply emmet in your code, it will work smoothly!!
Because the error you are reporting reads like this:
"command emmet.expandAbbriviation not found"
You may have a typo in that command which would explain the interpreters inability to find the command. Of course it could be that you have the typo here in this post while your settings in VS Code are correct.
Either way, the correct spelling is emmet.expandAbbreviation. Notice the letter before the 'v' is an 'e' not an 'i'.
This link here seems to have the same issue..
VS Code - command 'emmet.expandAbbreviation' not found
I had the same issue as well and could not find much help..
But what fixed it for me was using a previous version.. so something with the never version might not work with my settings I guess (and some them I can't change like my Mac OS..;-).. as my mac is 2015 edition).. Anyways if you are still having this issue.. this link is what worked for me..
https://code.visualstudio.com/updates/v1_55
Download an earlier version and you should be fine... Hope it works for you.
I added a vetur.config.js file to my root directory, and it is working fine.
I can tab as per normal. HTML autocomplete is also back.
got the reference here:
https://vuejs.github.io/vetur/reference/#example

VSCode Emmet html boilerplate?

We used to be able to type ! inside an html document in vscode to get html boiler plate content completion as documented here.
However it no longer works. Thoughts?
I noticed that if we type ! and select Edit > Expand Abbreviation, the ! is replaced with boilerplate, but I no longer get the intellisense that was there before.
Update
Looks like we need to do ctrl+shift+p and search for User Settings. Filter for the emmet settings and select the Trigger expansion on tab then the ! is replaced with the corresponding emmet snippet.
I also selected Show suggestions as snippets, but the intellisense / snippet is still not showing up.
If you want to get html boilerplate with Emmet Abbreviation, you should type html:5 and hit tab.
I have faced this issue in visual studio.
Step-1:
try below steps in url. https://marketplace.visualstudio.com/items?itemName=sidthesloth.html5-boilerplate
Step-2:
if it worked : "cheers .!"
else:
it could be issue with select language mode. on the bottom of visual studio next to LF on your screenshot select language mode and change it to html.
Thanks & Regards, Surya kiran.
The issue was with Language mode only. You will get the option to select the Langauage mode on the bottom.
Been very annoyed for many, many long minutes by the boilerplate shortcut's suddenly, inexplicably not working (maugre much extension-de-installing and intalling and re-installing, even with VS Code uninstalls and re-installs, but what I'm come up with from mining various forums (what does seem to work and doesn't appear to be settings-dependent or peculiar to my laptop) is:
COMMAND+K plus COMMAND+L (one can just HOLD COMMAND and type K and then L sequentially).
In the Emmet Abbreviation window that comes up type ! as usual and then press Enter/Return.
Simply striking ! will bring up the boilerplate. One can then simply press Enter to return to the code.
The two-stroke process of ! + TAB is now replaced by the only marginally more involved five-stroke process of ⌘ + K + L + ! + Enter.
For me it was the "<" problem
this is not working: <html
this is working: html
After a recent update to VS Code the familiar why of getting a html boilerplate failed. You could add a index.html to the file explore and the window would open for its content.
Using Shift and the exclamation mark key would produce it. That is no longer the case instead create your file in the explore. When it opens the window type html, you will receive a dropdown to select from instead.
enter image description here
I experienced this issue after configuring my VS Code environment for an online course. In my case, the behavior was due to the following pair being added to my settings.json file:
"emmet.showExpandedAbbreviation": "never"
After I removed this, the shortcuts returned.

Emmet on atom not working properly

Hi I'm using Emmet on Atom code editor and it works fine only with the simple tags like meta.
Nevertheless when I try something complex like ul>li*5 or meta[property=""] and then press tab, nothing happens.
Anyone know how to fix this?
It happened to me as well, the problem is that the same hotkey(tab) is set to multiple actions, so my solution was to edit the expand action like this.
go to Settings > Packages > Search Emmet...
on the keybindings get the last one tab and click on the copy icon
[]<- (something like that)
then go to Edit > Keymap... and copy the next there
'atom-text-editor:not([mini])':
'ctrl-alt-shift-c': 'emmet:expand-abbreviation'
As the keymap.. overrides all the other keybindings this one will work over all other definitions.
Note: if you use 'tab' as key binding it will only be used for expand-emmet, so you won't be able to actually tab__(2spaces) in HTML, PHP, more... files
HOPE IT HELPS
you find after installing emmet, tab completion doesn’t work as described in the documentation, go to Atom > Keymap or File > Keymap add the following code, then restart Atom (this fix worked for me):
'atom-text-editor:not([mini])':
'tab': 'emmet:expand-abbreviation-with-tab'
Answer is from
https://github.com/emmetio/emmet-atom/issues/503
It worked for me.
You go to Atom > Keymap or File > Keymap add the following code, then restart Atom.
'atom-text-editor:not([mini])':
'tab': 'emmet:expand-abbreviation-with-tab'
Just want to mention that like in https://stackoverflow.com/a/65645633/7773582 I had to restart Atom installed in Ubuntu Linux Groovy Gorilla to get my own keymap.cson for a new Keybinding with
'atom-text-editor[data-grammar="text html basic"]:not([mini]),
atom-text-editor[data-grammar~="erb"]:not([mini]),
atom-text-editor[data-grammar~="jade"]:not([mini]),
atom-text-editor[data-grammar~="css"]:not([mini]),
atom-text-editor[data-grammar~="stylus"]:not([mini]),
atom-text-editor[data-grammar~="sass"]:not([mini]),
atom-text-editor[data-grammar~="scss"]:not([mini])':
'shift-enter': 'emmet:expand-abbreviation-with-tab'
for the Emmet-Plugin to unfold its Syntax to work properly.
Any add-ons you install will most likely wont work if you dont restart your app.
If all solutions mentioned here does not take any effect to your Atom app is simply because your Atom app is STILL working in the backgroud even if you closed it.
Simple solution is go to Task Manager and End Task your Atom app there...
Hope it helps...
Happy Learning...

Extra < using auto complete in Sublime Text 2

I installed the All Autocomplete package in my Sublime Text 2 editor and everything works fine except when I type "<div" or something similar, the auto-complete box pops up, I select the one I want and hit enter and it adds "<<div></div>" with an extra "<" in the front of my tag. I have to go back and delete the extra "<" every time...(!)
I can't seem to resolve this issue. If I use the command CTRL+Space, the box pops up and I can select the tag I want and it does not include the extra tag but that messes with my flow.
Has anyone out there experienced this? Thanks for your help!
I've just installed the package and it seems to work fine for me.
I type <div and then hit Tab or Enter and it completes correctly.
The only thing I can think of is that the AllAutocomplete package is conflicting with another package/plugin you may have installed.
It seems to be a problem with Zen Coding. See here.
Unfortunately I tried all suggestions there, including peruvianidol's 'Packages/HTML/html_completions.py' solution, but haven't had any luck.