Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 <!doctype html public "<!doctype html">
- 2 <head>
- 3 <meta charset=utf-8>
- 4 <title>Blag</title>
- 5 <link rel="stylesheet" href="/assets/style.css">
- 6 </head>
- 7 <body>
- 8 <section id=main>
- 9 <header id=header>A blog by moshee about things and stuff.</header>
- 10 {{range .}}<article>
- 11 <h1>{{.Title}}</h1>
- 12 <div class=timestamp>Posted on <time>{{.Date}}</time></div>
- 13 <div class=comment-pointer>{{.Id}}</div>
- 14 <p>{{.Content}}</p>
- 15 </article>{{end}}
- 16 <footer id=footer>wat</footer>
- 17 </section>
- 18 </body>
- ~
- template.html [+] 4,6-7 All
- 1 " Vim syntax file
- 2 " Language: Golang text/template package
- 3 " Maintainer: moshee
- 4 " Latest Revision: 10 Dec 2011
- 5
- 6 if exists("b:current_syntax")
- 7 finish
- 8 endif
- 9
- 10 if !exists("main_syntax")
- 11 let main_syntax = "gotemplate"
- 12 endif
- 13
- 14 runtime! syntax/html.vim
- 15 unlet b:current_syntax
- 16
- 17 command! -nargs=+ HtmlHiLink hi def link <args>
- 18
- 19 syn keyword tmplKeywords if else range with end contained
- 20 syn keyword tmplTodo TODO NOTE contained
- 21
- 22 syn match tmplField /\..+/ contained
- 23 syn match tmplPiped /\|\s*.+/ contained
- 24 syn match tmplVar /\$/ contained
- 25
- 26 syn cluster tmplTop add=tmplKeywords,tmplField,tmplPiped,tmplVar,tmplComment
- 27 syn cluster htmlContainer add=htmlHead,htmlTitle,htmlString,htmlH1,htmlH2,htmlH3,htmlH4,htmlH5,htmlH6
- 28
- 29 syn region tmplRegion matchgroup=tmplDelimiter start="{{" end="}}" contains=@tmplTop containedin=@htmlContainer
- 30 syn region tmplComment start="{{/\*" end="\*/}}" contains=tmplTodo
- 31
- 32 HtmlHiLink tmplKeywords Statement
- 33 HtmlHiLink tmplField Type
- 34 HtmlHiLink tmplVar Operator
- 35 HtmlHiLink tmplComment Comment
- 36 HtmlHiLink tmplTodo Todo
- 37 HtmlHiLink tmplPiped Function
- 38 hi tmplDelimiter cterm=bold ctermfg=0 ctermbg=254
- 39
- 40
- 41 let b:current_syntax = "gotemplate"
- 42 delc HtmlHiLink
- 43
- 44 " vim: sw=4 ts=4;
Add Comment
Please, Sign In to add comment