Skip to content

Instantly share code, notes, and snippets.

@clamstew
Created October 6, 2015 18:24
Show Gist options
  • Save clamstew/2d719be174591c5d0e52 to your computer and use it in GitHub Desktop.
Save clamstew/2d719be174591c5d0e52 to your computer and use it in GitHub Desktop.
The doctype sublime snippet, so I can free it from the Library/Application Support/Sublime 3/ folder that I keep copying it from on old computers
<snippet>
<content><![CDATA[
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>My Title</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--<link rel="stylesheet" href="style.css">-->
</head>
<body>
<!-- body goes here -->
</body>
</html>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>doctype</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.html</scope>
</snippet>
@clamstew
Copy link
Author

clamstew commented Oct 6, 2015

To install

  1. In Sublime Text, go to Tools > New Snippet....
  2. copy and paste in the above snippet
  3. save file as doctype.sublime-snippet, in the default place that Sublime wants you to save it (~/Library/Application Support/Sublime Text 3/Package/User/doctype.sublime-snippet)

To use

Type doctype and press tab, and it will auto-complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment