abusaidm / html-snippets Goto Github PK
View Code? Open in Web Editor NEWVSCode html-snippets extention
License: MIT License
VSCode html-snippets extention
License: MIT License
Hello,
Great extension. However, the snippets aren't working correctly in .php files. I'd have to create a html file -> trigger the snippet inside .html file -> then will it work in .php files.
Once i restart VSCode, i need to repeat this.
Please address?
Thank you!
The <pre>
tag should not break lines. The snippets should tuning a bit.
i need to write html inside my react component which has js/jsx suffix, how can I make html-snippets work on js/jsx files?
thanks
Your snippets.json current has this:
"track": {
"prefix": "track",
"body": "<track src="$1" kind="$2" srclang="$3" label="$4">$5",
"description": "HTML - Defines a table row",
"scope": "text.html"
},
The description is wrong, obviously.
Is it possible to change everything I type in tag?
For example, I'm creating some new directives in my app using angular, and I have one called "my-tmpl", and I want to change it for
<my-tmpl></my-tmpl>
when I type "tab", is it possible? Is there any configuration for that?
Thanks for your time, and congras for the plugin, it's awesome.
Hi, first I would like to say that your extension is very handy.
The extension works flawlessly when directly typing the tagname
: it considers what already has been written and then completes it with all missing symbols and characters.
But when you start typing with the <
symbol (e.g. like this <tagName
) the extension appears to have 2 problems, or are they intended features?
Considering VSCode 1.10.2
First problem:
When typing <tagName
it doesn't present any possible snippets, at all. Unless you press Enter after selecting the tagName
in the auto-complete list, then CTRL+Space, then, and only then, the snippet shows.
e.g.:
First attempt with CTRL+Space after typing <a
, only the IDE a
tag appears:
With no snippet option:
After selecting the Auto-complete a
tag, and hitting CTRL+Space again, the snippet option finally appears:
Second problem:
Continuing the above process, after hitting Enter over the a
snippet option:
The extension places the snippet, but it doesn't take the symbol <
into consideration, leaving it, which I think it shouldn't.
Hi,
Thank you for this extension, but (for ex.) in JS file when I'm typing selec
, the html snippets shown up and if I hit tab, <select></select>
will be inserted.
It's very painful and I had to disable your extension.
Please fix this issue :)
It would be awesome if this worked when I was editing .hbs, .ejs, etc files.
Hello I started using HTML Snippets,
How do I enable it on other file types like .js or .twig ?
I tried everything... Nothing works !
Thank you for your help
On my Mac OSX Sierra (10.12.5) When I issue the CMD-K F I am expecting the HTML source code to be reformatted but instead it acts as though it hit an error and shuts down the editor completely without formatting the HTML source code.
Hi, I was wondering if this extension was meant to work with php files? I can get the completion popup to appear in html files, but cannot get it to work in php files (outside of php tags of course).
Thanks.
HTML-Snippets version: 0.0.14
Visual Studio Code Info:
Version 1.4.0
Commit 6276dcb0ae497766056b4c09ea75be1d76a8b679
Date 2016-08-04T16:49:32.489Z
Shell 0.37.6
Renderer 49.0.2623.75
Node 5.10.0
Steps to reproduce:
Demonstration video:
Can you please add License file to the repo and the vscode extension, so that we can use it our company. I can file a PR, if you like. Thanks
I saw your big bold message saying:
DISABLING THIS EXTENSION AS IT CURRENTLY CONFLICTS WTH EXISTING VS CODE HTML EXTENSION
Would you mind specifying what extension(s) this broke?
Example: Typing the following comment
// Add columns to table
and pressing ENTER gives:
// Add columns to <table>
</table>
Suggestion: configure extension to ignore keywords in //
and /* */
comment blocks.
Hello guys, before reinstalling my whole system this extension worked just fine, but now when I installed whole VS Code again, nothing is working, for example, I installed this extension but its just not working for example, I tried to simple html tag to fill whole my code with simple html template, but its not working, is there any solution?
By the way I am using newest VS code.
Hi Guys,
Pls help me config it to use in php file
Thanks
Below you can see a .gif of the issue. When trying to tab-expand in an HTML file using Emmet, the expected expansion does not work with HTML Snippets enabled, but functions fine when HTML Snippets is disabled.
I went through all of my extensions one-by-one to find this issue, so I'm pretty confident that it is this extension that is causing this. I can't reliably use this extension until this is fixed.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="container">
hello this is test of html
</div>
<link rel="stylesheet" href="style.css">
<script src="./script.js"></script>
</body>
</html>
It changes the settings and prevents emmet snippets from working at all.
I am using html in .HTML, .PHP etc. files.
I'd liek to add class like this - class=""
I want to create shortcuts for class When I type class and hit enter. It should be add this code class=""
cursor within double quotes.
So I can paste my class name there.
Thank you
Hi, first off i want to say i really like you extension. Makes my life a lot easier. Secondly not sure if this is an issue or should be regarded as a feature request.
On completion of html tag (final state).
eg. <div>|</div>
(using the pipe character to illustrate the cursor)
If you hit enter top open the structure as so:
eg.
<div>
</div>
What actually happens is that the cursor simply moves to the end of the closing tags
eg. <div></div>|
(again pipe character for illustration)
Is this intent, error or simply and oversight ? I may be the only one who finds this a bit frustrating. Again thank you for taking the time to make this extension.
Snippet recommendations was working perfectly but suddenly it stopped working after installing couple of django templates plugins. I guess there's some sort of overlapping. If there's a shortcut to enforce html snippets I think it would be a good workaround.
Is it possible to add support for .ejs files ? Or is it more complex than we could think ? Please add support for .ejs files :)
I'm using express and I write HTML with pug engine. I added the configuration of package.json like below.
{
"language": "pug",
"path": "./snippets/snippets.json"
}
But it doesn't work. Doesn't it support template engines yet?
when input a tag ,after input enter, not autocomplete.
Hi! I love your extension. It's really useful but I can't get it to work at files ending with blade.php
How do I solve this ? Thank you 😃
It would be nice if intellisense for html entities were supported.
Hey @abusaidm ,
I really like your extension and to be honest, you have done a better work than Microsoft.
I'm not sure if this was intended or not but still would like to know about this issue.
VS Code: 1.11
Extension: 0.1.0
notice the completion of "td"
My HTML snippet is not working in any language, and it's not even working in any language
Hi, after I updated to vsc 1.86.2 all the emmet is not working, pressing [TAB] after div or any emmet annotation is not working. I saw that the extension was disabled because VSC absorbed the functionality but now I can't use emmet anymore... is there a way to enable it again?
Version: 1.40.2
Commit: f359dd69833dd8800b54d458f6d37ab7c78df520
Date: 2019-11-25T14:54:40.719Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Linux x64 5.0.0-37-generic
<li></li>
)<li></li>
)Expected: a new line insert between the tags
Buggy behavior: The cursor jumps outside of the LI tags
I couldn't use the HTML5 tag "template".... Is it available?
html-snippets/snippets/snippets.json
Line 123 in cb9ee92
I have been using this extension for a long time but it suddenly stopped working.
I see on the page that it says it's disabled as it conflicts with the vs code html extension, but I don't see any extension with that name anywhere.
Is this useable at all right now?
When I open up my settings.json to add:
"files.associations": {
"*.php": "html",
"*.js": "html"
},
PHP and JS files have their syntax highlighting removed completely.
Is there a complete documentation of how it works somewhere?
I found out by chance that script:src
will expand to <script src=""></script>
and found that very useful! I wonder what else can be done and how but I can't find the documentation.
Great extension!
I used HTML Snippets in VSCode on Windows. It is really smooth . Says, when I press the > to complete a then both opening and closing tag appear immediately. When I use this plugin in VSCode on Mac, sometimes it works, some time it doesn't (no closing tag appears automatically). The trick is to leave my finger on the > key a bit longer can help solve the issue many times, but sometimes I get double >> because I might leave on it too long. I am not a pianist so I cannot estimate the beat. My Mac just came out market last year. Is there any setting to fix this problems on Mac?
hello
i am programmer and i can not find doc setting command in json file .
where you set this command
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.