I use sublime text as an editor for my html5 code, i also use Emmet to speed up my coding through Emmet's auto completion. In a blank .HTML file when i press control + space it generates the following code for me:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
Now i just thought of it as generating some more code of my choice as i press control + space. I want it to generate this code:
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset = "utf-8"/>
<meta name = "viewport" content="width = device-width, intial-scale = 1.0">
<link rel="" href="">
</head>
<body>
<script src = ""></script>
</body>
</html>
Is it possible to change some configurations?
You can create your own or edit existing Emmet snippets by editing the Emmet user settings file. You can open this file directly from Sublime Text (Sublime Text > Preferences > Package Settings > Emmet > Settings – User). By default it is empty and you need to add this structure:
New snippets are defined within the
abbreviations
object. In this example the HTML will be generated by typing mytrigger and hittingtab
in an HTML document. All abbreviations are online on GitHub.Also there's an example on my GitHub page.