Completion/templating snippets for XPTemplate vim plugin
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

145 lines
3.1 KiB

  1. " Personal additions
  2. "
  3. XPTemplate priority=personal
  4. let s:f = g:XPTfuncs()
  5. XPTvar $blank ' '
  6. XPTvar $js_dir 'javascripts'
  7. XPTvar $css_dir 'stylesheets'
  8. XPTvar $jq_ver '1.4.2.min'
  9. XPTvar $empty ''
  10. XPT copy_comment hidden
  11. <!-- © Copyright `strftime("%Y") $author^. All Rights Reserved. -->
  12. XPT copyright "
  13. &copy;`strftime("%Y") $author^ &mdash; All Rights Reserved
  14. XPT meta
  15. <meta name="`$_xSnipName^" content="`meta_content^" />
  16. XPT author alias=meta " <meta name="author"...
  17. XSET meta_content=$author
  18. XPT description alias=meta " <meta name="description"...
  19. XSET meta_content=Echo('')
  20. XPT keywords alias=meta " <meta name="keywords"...
  21. XSET meta_content=Echo('')
  22. XPT doctype " <!DOCTYPE...
  23. <!DOCTYPE html` `PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  24. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"^>
  25. XPT doctype5 " <!DOCTYPE html>
  26. <!DOCTYPE html>
  27. XPT charset " <meta charset...
  28. <meta charset="utf-8" />
  29. XPT skel abbr synonym=html|xhtml " xhtml skeleton
  30. `:doctype5:^
  31. <html>
  32. <head>
  33. `:title:^
  34. `:charset:^`
  35. `author^
  36. </head>
  37. <body>
  38. `cursor^
  39. </body>
  40. </html>
  41. `:copy_comment:^
  42. XPT link " <link rel='stylesheet'...
  43. XSET dir=$css_dir/
  44. XSET src=base.css
  45. XSET media=screen
  46. <link rel="stylesheet" type="text/css" href="`dir^`src^"` media="`media`"^ />
  47. XPT alternate " <link rel='alternate'...
  48. XSET type=application/rss+xml
  49. XSET url=/feed/
  50. <link rel="alternate" type="`type^" title="`title^" href="`url^" />
  51. XPT icon " <link rel='shortcut icon'...
  52. XSET url=/favicon.ico
  53. <link rel="shortcut icon" href="`url^" />
  54. XPT reset synonym=fonts|base|grids|layout|screen
  55. XSET name=$_xSnipName.css
  56. `:link( { 'src' : 'name' } ):^
  57. XPT print alias=link
  58. XSET src=print.css
  59. XSET media=print
  60. XPT jquery abbr synonym=jq " <script... src="jquery...
  61. XSET dir=$js_dir/
  62. XSET ver=$jq_ver
  63. <script type="text/javascript" src="`dir^jquery`-`ver^.js"></script>
  64. XPT script " <script... src="...
  65. XSET dir=$js_dir/
  66. XSET src=$empty
  67. <script type="text/javascript" src="`dir^`src^.js"></script>
  68. XPT jplug abbr synonym=jfile|jp|jf alias=script
  69. XPT jscript synonym=js
  70. <script type="text/javascript">
  71. `cursor^
  72. </script>
  73. XPT di wrap=content " <div id="">.</div>
  74. XSET val=Echo('')
  75. XSET val|post=Echo(V()=~'\V\^ id=""\$\|val' ? '' : V())
  76. XSET content|ontype=html_cont_ontype()
  77. <div` id="`val`"^>`content^^`content^html_cont_helper()^</div>
  78. XPT div abbr wrap=cursor " <div id..>\n\n</div>\n<!-- id..
  79. XSET val=Echo('')
  80. XSET val|post=Echo(V()=~'\V\^ id=""\$\|val' ? '' : V())
  81. <div` id="`val`"^>
  82. `cursor^
  83. </div>
  84. <!--`val^ -->
  85. XPT ul abbr alias=_tagAttr " <ul att?...
  86. XPT ol abbr alias=_tagAttr " <ol att?...
  87. XPT li abbr " <li>..</li>...
  88. XSET content=Echo('')
  89. <li>`content^</li>
  90. XPT lia abbr " <li><a href=...
  91. XSET href=#
  92. `:li( { 'content' : ':a:' } ):^
  93. XPT nav synonym=menu " <ul id='nav'...
  94. XSET nav=$_xSnipName
  95. <ul` id="`nav`"^>
  96. `:lia:^`
  97. `...^
  98. `:lia:^`
  99. `...^
  100. </ul>
  101. XPT a wrap=content " <a href...
  102. XSET href=#
  103. XSET content=Echo('')
  104. <a href="`href^">`content^</a>
  105. XPT lie8 wrap=content " <!--[if lt IE 8]>...
  106. XSET content=Echo('')
  107. <!--[if lt IE 8]>
  108. `content^
  109. <![endif]-->
  110. XPT lie9 wrap=content " <!--[if lt IE 9]>...
  111. XSET content=Echo('')
  112. <!--[if lt IE 9]>
  113. `content^
  114. <![endif]-->