Permalink
Browse files

Add html template.

  • Loading branch information...
1 parent b545738 commit 0e55f9f8dc582c73b6740ed2c9f1418eda8decbd Joseph Chiang committed Nov 1, 2011
Showing with 34 additions and 0 deletions.
  1. +7 −0 .vimrc
  2. +27 −0 html.txt
View
@@ -81,3 +81,10 @@ autocmd BufReadPost *
autocmd! BufWritePost .vimrc source %
" Output CSS files once *.scss saves.
autocmd BufWritePost *.scss !compass_lite <afile> <afile>:r.css
+
+" Create a template file.
+autocmd BufNewFile *.html so ~/.vim/html.txt
+autocmd BufNewFile *.html exe "1," . 10 . "g/name=\"created\" content=\".*\"/s//name=\"created\" content=\"" .strftime("%Y-%m-%d"). "\""
+autocmd Bufwritepre,filewritepre *.c execute "normal ma"
+autocmd BufWritePre,FileWritePre *.html exe "1," . 10 . "g/name=\"modified\" content=\".*\"/s//name=\"modified\" content=\"" .strftime("%c"). "\""
+autocmd bufwritepost,filewritepost *.c execute "normal `a"
View
@@ -0,0 +1,27 @@
+:insert
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="author" content="">
+<meta name="created" content="">
+<meta name="modified" content="">
+<title> Prototype</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/3.4.1/build/cssreset/reset-min.css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/3.4.1/build/cssfonts/fonts-min.css">
+<script type="text/javascript" src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
+<style type="text/css">
+
+</style>
+</head>
+<body>
+ <div>
+
+ </div>
+ <script>
+ YUI().use('', function (Y) {
+
+ });
+ </script>
+</body>
+</html>

0 comments on commit 0e55f9f

Please sign in to comment.