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.

106 lines
2.3 KiB

  1. " Personal additions
  2. "
  3. XPTemplate priority=personal
  4. let s:f = g:XPTfuncs()
  5. XPTvar $blank ' '
  6. XPTvar $js_dir 'scripts'
  7. XPTvar $css_dir 'styles'
  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 skel abbr synonym=html|xhtml " xhtml skeleton
  23. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  24. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  25. <html>
  26. <head>
  27. `:title:^
  28. `:contenttype:^`
  29. `more^.^
  30. </head>
  31. <body>
  32. `cursor^
  33. </body>
  34. </html>
  35. `:copy_comment:^
  36. XPT link " <link rel='stylesheet'...
  37. XSET dir=$css_dir/
  38. XSET src=base.css
  39. <link rel="stylesheet" type="text/css" href="`dir^`src^" />
  40. XPT reset synonym=fonts|base|grids|layout
  41. XSET name=$_xSnipName.css
  42. `:link( { 'src' : 'name' } ):^
  43. XPT jquery abbr synonym=jq " <script... src="jquery...
  44. XSET dir=$js_dir/
  45. XSET ver=$jq_ver
  46. <script type="text/javascript" src="`dir^jquery`-`ver^.js"></script>
  47. XPT script " <script... src="...
  48. XSET dir=$js_dir/
  49. XSET src=$empty
  50. <script type="text/javascript" src="`dir^`src^.js"></script>
  51. XPT jplug abbr synonym=jfile|jp|jf alias=script
  52. XPT jscript synonym=js
  53. <script type="text/javascript">
  54. `cursor^
  55. </script>
  56. XPT di wrap=content " <div id="">.</div>
  57. XSET val=Echo('')
  58. XSET val|post=Echo(V()=~'\V\^ id=""\$\|val' ? '' : V())
  59. XSET content|ontype=html_cont_ontype()
  60. <div` id="`val`"^>`content^^`content^html_cont_helper()^</div>
  61. XPT div abbr wrap=cursor " <div id..>\n\n</div>\n<!-- id..
  62. XSET val=Echo('')
  63. XSET val|post=Echo(V()=~'\V\^ id=""\$\|val' ? '' : V())
  64. <div` id="`val`"^>
  65. `cursor^
  66. </div>
  67. <!--`val^ -->
  68. XPT ul abbr alias=_tagAttr " <ul att?...
  69. XPT ol abbr alias=_tagAttr " <ol att?...
  70. XPT li abbr " <li>..</li>...
  71. XSET content=Echo('')
  72. <li>`content^</li>
  73. XPT lia abbr " <li><a href=...
  74. XSET href=#
  75. `:li( { 'content' : ':a:' } ):^
  76. XPT nav synonym=menu " <ul id='nav'...
  77. XSET nav=$_xSnipName
  78. <ul` id="`nav`"^>
  79. `:lia:^`
  80. `...^
  81. `:lia:^`
  82. `...^
  83. </ul>