'atom.io auto create html basic structure
Im using atom.io for some time now and really like it. there is just one thing im missing. I used to use brackets and sublime before and they both had a feature where you could create the basic structure of a html documents by just typing html.
this would just set the html, head and body tag. created the charset meta, title and link to css file.
I create a lot of html files a day so it would be really helpfull if I know the shortcode or the package which supports this!
Solution 1:[1]
There is a nice Plugin, called emmet: https://atom.io/packages/emmet
When you got that, you just have to type ! -> tab in an empty document. You get pretty much the same result as @hatchet GIF.
Solution 2:[2]
If you have disabled the autocomplete functionality mentioned in the currently accepted answer, or want more flexibility than that allows, there is a file-templates package:
https://atom.io/packages/file-templates
Here are some basic instructions.
- To install the package:
edit->preferences->install->file-templates. - To save the template:
packages->new template from this file. - To open a new file with that template, just hit
ctrl-alt-nand select it.
Solution 3:[3]
Make sure your file has .html added on the end of its name.
Then go back into Atom, type HTML, and press enter. Your boilerplate should appear. Solved my problem instantly!
Solution 4:[4]
If we install Emmet package we are not getting the boiler plate code. So I disabled emmet and it is working fine for me.
Solution 5:[5]
!tab is the command u seek. But it won't work unless you create a file and save it with the html extension...
So go create a new file in the directory u want, call it index.html and now go type !tab
It should work 100%, if not be sure u have emmet installed.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | nito |
| Solution 2 | eric |
| Solution 3 | Dharman |
| Solution 4 | Sriram Ramya Sruthi |
| Solution 5 | Alex N?stase |
